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

Developer

API Reference

JSONPARSER_GETJSON()

Brew Release
Brew MP 1.0.2
Description

Caller supplies JSON data to construct the parser. This function makes a copy of this buffer at the given JSONID value upto its logical end. The ID must point to a valid JSONType or JSONID_ROOT.
For example, if JSONID starts a string, then the copied buffer size is the size of such string. However, if it is an array, then the size would be upto the end of such array, including all its nested values.
Params
pj
[]:
JSON context
id
[]:
ID at which the JSON data is copied
ppcsz
[]:
filled with underlying JSON data pointer
pnSize
[]:
size of the valid JSON data
Interface
Prototype
  •    int JSONParser_GetJSON(JSONParser *pj, JSONID id, const char **ppcsz, int *pnSize);
     
    
Return

  • JSONPARSER_SUCCESS on success, otherwise JSONPARSER_ERROR