This procedure adds response element into memory.

ParameterTypeDescription
element30A VARYING, VARSIZEMandatoryName of element
parent30A VARYING, VARSIZEOptional, can be omittedName of parent element. This parameter points parent for currently added element. When You want to send response with subfile (array) The recommendation is to use sub element name “items”.
structure10A VARYING, VARSIZEOptional, can be omittedStructure of element (“array” or “object”)

The following elements names are currently reserved as base for “communication layer”. These elements don’t have parent:

  • data
  • messages
  • control
  • error

The procedure returns pointer for newly added element. If procedure can’t add element, then returns null.

Examples:

e_ptr = respAddElement('data');

respAddElement('data':*omit:'object');

respAddElement('data':*omit:'array');

respAddElement('items': 'data': 'array');