khoarus / rapidjson

Automatically exported from code.google.com/p/rapidjson
MIT License
0 stars 0 forks source link

Demo SAX parsing #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is there a demo showing how to use the SAX parsing capability of rapidjson?

I searched through the examples but can't find a thing and I can't understand 
how to do it just by reading the rapidjson source code.

If someone is willing please add an example of how to do SAX parsing with 
rapidjson.

Original issue reported on code.google.com by alex.bu...@gmail.com on 29 Aug 2012 at 8:40

GoogleCodeExporter commented 8 years ago

Original comment by milo...@gmail.com on 12 Nov 2012 at 2:15

GoogleCodeExporter commented 8 years ago
Example attached. Sample output:

Original JSON:
  { "hello" : "world", "t" : true , "f" : false, "n": null, "i":123, "pi": 3.1416, "a":[1, 2, 3, 4] } 
hello = world
t = true
f = false
n = null
i = 123
pi = 3.141600
array a [
1
2
3
4
]

Original comment by joyc...@hotmail.com on 4 Apr 2013 at 11:01

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by milo...@gmail.com on 24 Jun 2014 at 2:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Documentation on SAX-style API
https://github.com/miloyip/rapidjson/blob/master/doc/sax.md

SAX-style API related examples:
https://github.com/miloyip/rapidjson/tree/master/example/simplereader
https://github.com/miloyip/rapidjson/tree/master/example/simplewriter
https://github.com/miloyip/rapidjson/tree/master/example/messagereader
https://github.com/miloyip/rapidjson/tree/master/example/capitalize

Original comment by milo...@gmail.com on 13 Jul 2014 at 10:10

GoogleCodeExporter commented 8 years ago
Awesome! Thanks!

Original comment by alex.bu...@gmail.com on 13 Jul 2014 at 9:16