interactive-matter / aJson

aJson is an Arduino library to enable JSON processing with Arduino. It easily enables you to decode, create, manipulate and encode JSON directly from and to data structures.
http://interactive-matter.org/2010/08/ajson-handle-json-with-arduino/
566 stars 136 forks source link

Example for adding json objects to a json array? #78

Open fmgomes opened 8 years ago

fmgomes commented 8 years ago

Hi, is there any example on how to add json objects to a json array? From the API this seems possible, but I'm not getting how to do it correctly. Thanks!

rvdende commented 7 years ago

aJsonObject* root = aJson.createArray();

aJsonObject* day; day=aJson.createItem("Monday"); aJson.addItemToArray(root, day);