Add( ) method (JsonObject)
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Creates a property with a given name and value. On successful execution, this method returns TRUE.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Json.ObjectModel.JsonObject class
Syntax
|
- property-name
- A CHARACTER expression naming the new property to be created. This
name can be any string that can be represented as a valid Unicode string.
If a property by this name already exists in this JsonObject or if this parameter is an empty string ("") or is the Unknown value (
?), a JsonError is raised.property-name is case-sensitive.
- value
- The value to which the new property is to be set. The data type
of the property is defined by the data type mapping described below.
If value is the Unknown value (
?) the property is set to the a JSON null value.
If you add a JsonObject or JsonArray that references this JsonObject or a construct further up the JSON construct tree, a JsonError is raised.
The data type of the added JSON value set by this method call depends upon the ABL data type of the value parameter.
| A value parameter of data type | Data type of JSON value |
|---|---|
|
CHARACTER, LONGCHAR |
string |
| INTEGER, INT64, DECIMAL | number |
| LOGICAL | boolean |
| MEMPTR, RAW, ROWID | string with a value as if you had called BASE64-ENCODE( ) on value |
| DATE, DATETIME, DATETIME-TZ | string with a value as if you had called ISO-DATE( ) on value |
| COM-HANDLE, HANDLE, RECID | number with a value as if you had called INTEGER( ) on value |