SetNumber( ) method (JsonObject)

Sets the named property of JsonObject to the given 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

Applies to: Progress.Json.ObjectModel.JsonObject class

Syntax

SetNumber( INPUT property-name AS CHARACTER,
           INPUT value AS CHARACTER )
property-name
A CHARACTER expression naming the existing property whose value is to be changed.
value
A CHARACTER expression representing a numeric value to which the new property is to be set. The value should 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 JSON null value.

A JsonError is raised if: