kazuho / picojson

a header-file-only, JSON parser serializer in C++
BSD 2-Clause "Simplified" License
1.12k stars 221 forks source link

Fix example to not report syntax error on valid JSON input #98

Open rmisev opened 7 years ago

rmisev commented 7 years ago

Adds parse_array_stop(size_t) override, which returns true, to the root_context class in the streaming.cc example.

If not overriden, picojson::deny_parse_context::parse_array_stop(size_t) returns false what causes syntax error.

Related issue: #82

ooer commented 7 years ago

It would be great to pull at least commit f5fdb1f It took me some time to fix the same problem.

Thank you.