hpcc-systems/HPCC-Platform — pull request #3820 by afishbeck (2012-12-21 23:47:16+00:00)
Title: HPCC-8435 Implement JSON Pull Parser and PTree creation

Parsing and creating PTrees from JSON is needed for several
upcoming JSON integration items. This implements a PullReader
and a BufferReader, as well as createPTreeFromJSON Functions.

This implementation emulates the style and practice of the current
XML parsers. It also sticks to the existing parser interfaces
completely future enhancements could be made that would improve those
interfaces to benefit more from JSON data type knowledge. Especially
to improve symmetry between building a PTree and serializing back
to JSON.

While the parsers support full JSON naming syntax, JSON supports
object names that cannot currently be supported as property trees.
Creating a property tree from such JSON will throw a PTree exception.

The general philosophy for the pull parser has been that each call to
IPulXMLReader::next() will result in one event (or error). Further
action after an event is minimized. The event handler should be able
to abort immediately without further events or syntax based errors.

Signed-off-by: Anthony Fishbeck