28.03.2021, 11:55
I have a problem with json data from the MQTT broker.
I receive this string from the MQTT : {"Redox": "954","Ph": "6.67","Temperatuur": "10.5","Error message": ""}
When I check it (https://jsonformatter.curiousconcept.com/#) is valid JSON data.
When i decode this with
payload = "{"Redox": "954","Ph": "6.67","Temperatuur": "10.5","Error message": ""}"
msg = json.pdecode(payload)
The result is still a string instead of a table.
I guess i'm missing something obvious.
Can anyone help me?
I receive this string from the MQTT : {"Redox": "954","Ph": "6.67","Temperatuur": "10.5","Error message": ""}
When I check it (https://jsonformatter.curiousconcept.com/#) is valid JSON data.
When i decode this with
payload = "{"Redox": "954","Ph": "6.67","Temperatuur": "10.5","Error message": ""}"
msg = json.pdecode(payload)
The result is still a string instead of a table.
I guess i'm missing something obvious.
Can anyone help me?