Json parser with NON-OS SDK
Posted: Sat Jan 27, 2018 3:16 pm
Hello guys,
My ESP8266 is acting like a web server, and a client is sending to it a JSON string via WebSocket.
All is working fine, although I am not sure how to access the value of the objects in the JSON string.
The ESP8266 receives something like this:
How do I access the value of command?
I saw the SDK APIs have functions like
Thanks!
My ESP8266 is acting like a web server, and a client is sending to it a JSON string via WebSocket.
All is working fine, although I am not sure how to access the value of the objects in the JSON string.
The ESP8266 receives something like this:
Code: Select all
{"command":1}
How do I access the value of command?
I saw the SDK APIs have functions like
Code: Select all
but can't figure out how to use them. Does anybody have suggestions or examples I can take a look at? jsonparse_setup
jsonparse_copy_value
Thanks!