Previous Next

Add( ) method (JsonObject)
Creates a property with a given name and value. On successful execution, this method returns TRUE.
Return type:
Access:
Applies to:
 
Syntax 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS CHARACTER )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS COM-HANDLE )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS DATE )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS DATETIME )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS DATETIME-TZ )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS DECIMAL )
Add( INPUT property-name AS CHARACTER,
     INPUT value AS HANDLE )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS INT64 )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS INTEGER )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS LOGICAL )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS LONGCHAR )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS MEMPTR )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS RAW )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS RECID )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS ROWID )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS CLASS JsonObject )
 
Add( INPUT property-name AS CHARACTER,
     INPUT value AS CLASS JsonArray )
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.
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.
Table 127:

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.