Previous Next

SetNumber( ) method (JsonArray)
Sets an element of the JsonArray to the specified value. This method is useful in situations where none of the ABL numeric data types can be used to hold a JSON numeric value. On successful execution, this method returns TRUE.
Return type:
Applies to:
 
Syntax 
SetNumber( INPUT index AS INTEGER,
           INPUT value AS CHARACTER )
index
An INTEGER that identifies the element in the array to change. Indexing into JsonArrays is 1-based.
A JsonError is raised if index is less than 1, is greater than the length of the JsonArray, or is the Unknown value (?).
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. If the value is not a valid JSON number value or is an empty string (""), a JsonError is raised.

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