// Example of printing the number of profiles in the Database every second
data = message["data"]
data = json.loads(data)
self.print("Data: {}".format(data))
except KeyboardInterrupt:
return True
After Change
// Example of printing the number of profiles in the Database every second
mdata = message["data"]
// Convert from json to dict
mdata = json.loads(mdata)
profileid = mdata["profileid"]
twid = mdata["twid"]
// Get flow as a json
flow = mdata["flow"]
// Convert flow to a dict
flow = json.loads(flow)
// Process the flow
self.process_flow(profileid, twid, flow)