The JSON Parser for Progress ABL is an ABL object oriented implementation of JSON parser built on top of the cJSON project – “An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C compliant JSON parser, under MIT license”.

The project page on SourceForge web site – abljson, as always we welcome contributors or any feedback that can help us make this project more useful.

The reader object can be used to load and parse a JSON string from either a file on the file system or from a character, longchar or memptr variable. The ‘automated’ parse method will go through all JSON elements and call the corresponding call-back methods on read handler depending on the element type (array, object, string, numeric, logical), the read handler should have been set before calling the parse method.

The reader can also directly read buffer or temp-table buffer object content from a JSON document that was previously loaded. The writer object can be used to create JSON documents using either lower level methods to create JSON elements or directly serialize complex data structures like dataset, temp-table, buffer or even query results. Because of the limited performance on serializing complex data structures like data set or temp-table as well as the character data type size limitation for JSON document output the cJSON parser was extended with additional functionality.

The complete API documentation can be consulted online or downloaded.

Comments are closed.