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.

Table 1. JSON methods for temp-tables and ProDataSets
Method Description
READ-JSON( )

Reads a specified JSON string, JsonArray object, or JsonObject object into a corresponding ProDataSet, a temp-table, or a temp-table buffer object.

WRITE-JSON( )
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.
SERIALIZE-ROW ( )
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.

Note: The 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.
1 See Minimize the size of JSON data for more information.