Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : AddNumber( ) method (JsonObject)
 

AddNumber( ) method (JsonObject)

Creates a property with a given name and JSON number value. This method is useful in situations where none of the ABL numeric data types can be used to hold a JSON numeric value. For example, 10E+100.
On successful execution, this method returns TRUE.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Json.ObjectModel.JsonObject class

Syntax

AddNumber( INPUT property-name AS CHARACTER,
           INPUT value AS CHARACTER )
property-name
A CHARACTER expression representing the new property to be created. This name can be any string that can be represented as a valid Unicode string.
If property-name is the empty string ("") , is the Unknown value (?), or if the property already exists, a JsonError is raised.
value
A CHARACTER expression representing a numeric value to which the new element is to be set. The value must match the pattern for valid JSON number values. These may be integers ([-]dddd), decimals ([-]ddd.ddd), or scientific notation ([-]ddd[.ddd]e[+|-]ddd). If value is the Unknown value (?), the element is set to the a JSON null value. If the value is not a valid JSON number value or is an empty string (""), a JsonError is raised.