Read( ) method (JsonObject)
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Uses the data from a ProDataSet, temp-table, or buffer handle to generate a
JsonObject. The current contents of the JsonObject are
removed.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Json.ObjectModel.JsonObject class
Syntax
|
- pds-handle
- A HANDLE to either a static ProDataSet or dynamic ProDataSet to be
used as the source for setting the
JsonObject. If this value is the Unknown value (?), aJsonErroris raised. - tt-handle
- A HANDLE to either a static temp-table or dynamic temp-table to be
used as the source for setting the JsonObject. If this value is the Unknown value
(
?) aJsonErroris raised. - buffer-handle
- A HANDLE to either a static temp-table buffer or dynamic temp-table
buffer to be used as the source for setting the
JsonObject. If this value is the Unknown value (?), aJsonErroris raised.Note: The value of theJsonObjectis based on the one row in the buffer, not the entire table. This behavior differs fromWRITE-JSON( )andWRITE-XML( ). Those methods process the entire table associated with the buffer. - omit-initial-values
- A LOGICAL expression where TRUE directs the AVM to exclude temp-table
fields containing their initial values from the JSON object, and FALSE directs the AVM
to include all temp-table field data in the JSON. The default value is FALSE. If you
specify the Unknown value (
?), the method uses the default value of FALSE.When working with large ProDataSets, omitting fields containing their initial values can yield smaller JSON values, more efficient network transfers, and performance gains with the
JsonObject( )constructor.This behavior applies both to temp-table fields that have the default initial value for its data type, and for fields that have an initial value set with the ABL
INITIALoption. When a temp-table handle is passed toJsonObject:Read( ), theJsonObjectis set to a single property. - read-before-image
- A LOGICAL expression where TRUE directs the AVM to include ProDataSet
before-image data and error information in the JSON object. The
default value is FALSE. If you specify the Unknown value (
?), the method uses the default value of FALSE.
Notes
- You cannot execute the method on a database buffer.
- 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
The following example shows a temp-table definition
passed to JsonObject:Read( ):
|
The following is the resultant JSON construct
tree, myLongchar:
|