API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

JSONPARSER

Brew Release
Brew MP 1.0.2
Description
This library provides a set of functions to parse JSON data. The parsing and accessing functions provide a simple and generic mechanism which requires no memory allocation.
A JSONID (or simply ID) refer to a specific value within JSON data and identifies a particular JSONType (or just type) value. Given a JSONID, GetType() returns its type.
The root of JSON data is represented by the special JSONID defined as JSONID_ROOT. Use this as the jumping point for looking up other IDs.
Once the parser is constructed using Ctor(), one of the Lookup() methods can be used to query the nested JSON data. EnumInit() and Next() methods provide a way to enumerate arrays and objects to retrieve their member IDs.
Relevant JSONIDs can then be passed to one of the GetXXX() methods to retrieve their underlying values.
Use GetType() to find out the JSONType at a particular JSONID.
A JSONParser can be declared on the stack for quick parsing needs.