json-parser/json-builder

Could not understand how to use this library

rohitsay89 opened this issue · 2 comments

I am not able to understand from the description about how can I use the json-builder to create json files from the software. Can you please post a bit more explanation on how to create JSON files using the functions.

Thanks,
Rohit

  1. RTFM!
  2. I'm on a phone right now so the explanations might not be very detailed. You basically use the json_object_new function to create a new empty object, and then use the json_object_push to add new values into the object. Then you allocate a appropriate buffet using the json_measure function and use the json_serialize function to turn in into a string. After that you just open a file and write that string to the file. Done!

Also we can add example folder for sample code.