SetNumber( ) method (JsonArray)
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
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: LOGICAL
Applies to: Progress.Json.ObjectModel.JsonArray class
Syntax
|
- 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.