SetJSONDouble()
Syntax
SetJSONDouble(JSONValue, Value.d)Description
Change the type of the JSON value to #PB_JSON_Number and store the given double value.
Parameters
JSONValue The JSON value. Value.d The value to store.
Return value
None.
Remarks
Note that JSON does not permit the special floating point values +Infinity, -Infinity or NaN in JSON data. If such a value is set with this function, it will be replaced by a JSON 'null' literal when the data is being saved or encoded. The functions IsInfinity() or IsNaN() can be used to detect this case.
Example
If CreateJSON(0) ArrayValue = SetJSONArray(JSONValue(0)) SetJSONDouble(AddJSONElement(ArrayValue), 1.23) SetJSONDouble(AddJSONElement(ArrayValue), 4.56) Debug ComposeJSON(0) EndIf
See Also
GetJSONDouble(), SetJSONArray(), SetJSONBoolean(), SetJSONFloat(), SetJSONInteger(), SetJSONNull(), SetJSONObject(), SetJSONString(), SetJSONQuad()
Supported OS
All