GetJSONDouble()

语法

Result.d = GetJSONDouble(JSONValue)
概要
Return the value of a JSON value of type #PB_JSON_Number as a double precision floating point value.

A JSON value can be set to a number with SetJSONDouble(), SetJSONFloat(), SetJSONInteger() or SetJSONQuad().

参数

JSONValue The JSON value. The value must be of type #PB_JSON_Number.

返回值

The number as a double.

示例

  ParseJSON(0, "[1, 1.23, 1.23e-3]")
  
  Debug GetJSONDouble(GetJSONElement(JSONValue(0), 0))
  Debug GetJSONDouble(GetJSONElement(JSONValue(0), 1))
  Debug GetJSONDouble(GetJSONElement(JSONValue(0), 2))

参阅

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

已支持操作系统

所有

<- GetJSONBoolean() - Json Index - GetJSONElement() ->