Methods and attributes
- Last Updated: June 13, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Methods and attributes
To use the JSON read and write features described in this content, use the handle to a temp-table, temp-table buffer, or ProDataSet to access methods and attributes of the object. The following table describes the available methods.
| Method | Description |
|---|---|
|
Reads a specified JSON string, JsonArray object, or JsonObject object into a corresponding ProDataSet, a temp-table, or a temp-table buffer object. |
|
Writes a specified JSON string, JsonArray object, or JsonObject object from a corresponding ProDataSet, a temp-table, or a temp-table buffer object. In the case of the temp-table buffer object, all the records of the temp-table associated with the buffer object are written to the JSON string, JsonArray object, or JsonObject object—not just the one record in the buffer. |
|
Serializes a temp-table buffer's current row either to a JSON or XML string or to a JsonObject object. |
The following table describes the JSON related attributes.
| Attribute | Data type | Applies to | Description |
|---|---|---|---|
|
|
Data-relation | Specifies whether the WRITE-JSON( ) method should hide foreign key fields in the child records of a nested data-relation in a ProDataSet. |
|
|
Data-relation | Specifies whether the AVM embeds child rows within a parent row in the JSON. This affects both the data and schema. |
|
|
Buffer-field |
Indicates whether this field is written when the temp-table is serialized, for example into JSON or XML. This attribute als interacts with the XML-NODE-TYPE attribute. |
|
|
ProDataSet temp-table temp-table buffer temp-table buffer field |
Optionally specifies the name of a ProDataSet, a temp-table, a temp-table buffer, or a temp-table buffer-field object as it should appear when serialized, for example into JSON or XML. This attribute also interacts with the XML-NODE-NAME attribute. |
SERIALIZE-HIDDEN and SERIALIZE-NAME attributes
provide generalized support for serializing data objects to either
JSON or XML. These attributes interact with the XML-specific attributes
in ABL. For more information, see the descriptions of these attributes
in ABL Reference.