1

How do I read the Json object name in arduino? For { "pi" : "3.14" }, I want the arduino to automatically read the object name "pi" and then th value "3.14" I'm using arduino Uno.

1 Answer 1

0

There is a brilliant JSON library called ArduinoJSON. It can be installed using the arduino library manager.

See https://bblanchon.github.io/ArduinoJson/doc/decoding/ for further details.

To loop through the keys, you can use: https://bblanchon.github.io/ArduinoJson/api/jsonobject/begin_end/

or if you know the key, you can do jsonObject["pi"] to get the value

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.