Read( ) method (JsonArray)
- Last Updated: October 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- 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 this JsonArray is a JsonObject representing a row in the temp-table.
If this value is the Unknown value (
?), a JsonError is 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 INITIAL option.
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.
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:
|