GetJSONFloat()
Syntax
Result.f = GetJSONFloat(JSONValue)Description
Return the value of a JSON value of type #PB_JSON_Number as a single precision floating point value.
A JSON value can be set to a number with SetJSONDouble(), SetJSONFloat(), SetJSONInteger() or SetJSONQuad().
Parameters
JSONValue The JSON value. The value must be of type #PB_JSON_Number.
Return value
The number as a float.
Example
ParseJSON(0, "[1, 1.23, 1.23e-3]") Debug GetJSONFloat(GetJSONElement(JSONValue(0), 0)) Debug GetJSONFloat(GetJSONElement(JSONValue(0), 1)) Debug GetJSONFloat(GetJSONElement(JSONValue(0), 2))
See Also
SetJSONDouble(), SetJSONFloat(), SetJSONInteger(), SetJSONQuad(), GetJSONBoolean(), GetJSONDouble(), GetJSONElement(), GetJSONInteger(), GetJSONMember(), GetJSONString(), GetJSONQuad(), JSONType()
Supported OS
All