I have been playing with yajl for a couple of days and really like the tree node model. After it is done parsing you get the structure of your json file and you can go through it. Like the example here:
http://lloyd.github.io/yajl/yajl-2.0.1/example_2parse_config_8c-example.html
This example is nice and easy to understand, but I would like to know how to use the streaming example which they show here. http://lloyd.github.io/yajl/yajl-2.0.1/reformatter_2json_reformat_8c-example.html This would be better for large files I imagine.
The streaming example goes through and raises events whenever the parser encounters certain things. Like when it encounters a boolean it raises an event that it found a boolean and I am given the boolean value. However, I dont know what key, or object that boolean belongs to. Likewise, the map close event happens. What can I do there? The map closed, great. Ive got this yajl_gen pointer and I dont know what to do with it. Apologies if this question is vague or i just dont know enough about yajl parsing. Thanks for reading.