respAddObjectValue()

This procedure adds Object value for existing field.

ParameterTypeDescription
ptrPOINTERMandatoryPointer to field
obj_ptrPOINTERMandatoryPointer to object

The procedure returns pointer of field. If procedure can’t add value, then returns null.

Note: The JSON Object have to be created by JSON_new(); procedure. Then use: JSON_startNode, JSON_endNode, JSON_addStringPair, JSON_addNumericPair, etc….. By these functions You can create JSON Object into memory. Then this JSON object can be put into response. After field is added then JSON_destroy must be used to avoid memory leak.`

Examples:

xxPtr = respAddField('data': 'objectData');
respAddObjectValue(xxPtr: %ADDR(xxJsonObject));