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

Developer

API Reference

JSONPARSER_GETSTRING()

Brew Release
Brew MP 1.0.2
Description
Given a JSONString, retrieve the string value.
Params
pj
[]:
JSON context
id
[]:
JSONString ID
psz
[]:
filled with string
nSize
[]:
size of the psz
pnReq
[]:
on return, contains the size of a buffer necessary to hold the full string. If nLen < *pnReq, the string has been truncated to fit into the buffer that was passed.

Interface
Prototype
  •    int JSONParser_GetString(JSONParser *pj, JSONID id,
                             char *psz, int nSize, int *pnReq);
                               
Return
  • JSONPARSER_SUCCESS : on success. Check *pnReq to make sure string is not truncated otherwise JSONPARSER_ERROR