GetJSONInteger()

Syntax

Result = GetJSONInteger(JSONValue)
Description
Return the value of a JSON value of type #PB_JSON_Number as an integer 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 an integer.

Example

  ParseJSON(0, "[1, 2, 3, 4, 5]")
    
  For i = 0 To JSONArraySize(JSONValue(0)) - 1
    Debug GetJSONInteger(GetJSONElement(JSONValue(0), i))
  Next i

See Also

SetJSONDouble(), SetJSONFloat(), SetJSONInteger(), SetJSONQuad(), GetJSONBoolean(), GetJSONDouble(), GetJSONElement(), GetJSONFloat(), GetJSONMember(), GetJSONString(), GetJSONQuad(), JSONType()

Supported OS

All

<- GetJSONFloat() - Json Index - GetJSONMember() ->