You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried everything to split json objects so that json_tokener_parse() could parse it.
My Code: json_tokener_parse() doesn't work if there are more than 1 object in the json file but works good when it have one object. I have read all the documentation but couldn't find a way to divid string objects and parse each object at a time.
Your example here has a single object. If that's actually what your input looks like, then it is correct that you only get a single object back.
On the other hand, if you have another object (immediately) after that one, simply grab the char_offset of where the previous call to json_tokener_parse_ex left off, and call it again starting from that point in your buffer.
e.g. starting from the example in the docs at http://json-c.github.io/json-c/json-c-0.13/doc/html/json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a, you might do something like:
I have tried everything to split json objects so that json_tokener_parse() could parse it.
My Code: json_tokener_parse() doesn't work if there are more than 1 object in the json file but works good when it have one object. I have read all the documentation but couldn't find a way to divid string objects and parse each object at a time.
The text was updated successfully, but these errors were encountered: