This procedure adds response element into memory.
| Parameter | Type | Description | |
|---|---|---|---|
| element | 30A VARYING, VARSIZE | Mandatory | Name of element |
| parent | 30A VARYING, VARSIZE | Optional, can be omitted | Name 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”. |
| structure | 10A VARYING, VARSIZE | Optional, can be omitted | Structure 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: