Read( ) method (JsonArray)
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Uses the contents of a temp-table to generate a JsonArray.
The current contents of the JsonArray are removed.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Json.ObjectModel.JsonArray class
Syntax
|
- tt-handle
- Represents a handle to either a static temp-table or dynamic
temp-table to be used as the source for setting the
JsonArray. Each element in thisJsonArrayis aJsonObjectrepresenting a row in the temp-table. If this value is the Unknown value (?), aJsonErroris raised. - omit-initial-values
- An LOGICAL expression where:
- TRUE directs the AVM to exclude temp-table fields containing their initial values from the JSON object.
- FALSE directs the AVM to include all temp-table field data in the
JSON. The default value of the expression is FALSE. If you specify the Unknown value
(
?), the method uses the default value of FALSE.
When working with large temp-tables, omitting fields containing their initial values can yield smaller JSON values, more efficient network transfers, and performance gains with the
Read( )method.This behavior applies both to temp-table fields which have the default initial value for its data type, and for fields which have an initial value set with the ABL
INITIALoption.The ABL
READ-JSON( )method always populates created records with initial values from the temp-table or ProDataSet definition. Other applications might not do this.
Notes
- When executing the method, there is no guarantee as to the contents of the buffers involved after the method finishes executing.
- Binary types, including BLOB, RAW, and ROWID are base64-encoded/decoded. See Data type mapping in Use JSON with ABL Applications for more information.
Example
When a temp-table handle is passed to JsonArray:Read( ), the JsonArray is set to a series of objects
representing each row in the temp table. The following is a temp-table definition that is
passed to JsonArray:Read( ):
|
The following is the resultant JSON construct tree, myLongchar:
|