GetJSONMember()

语法

Result = GetJSONMember(JSONValue, Key$)
概要
Return the JSON object member with the given Key$ of a JSON value of type #PB_JSON_Object.

参数

JSONValue The JSON value. The value must be of type #PB_JSON_Object.
Key$ The key of the member to return.

The key is compared case sensitive unless the #PB_JSON_NoCase flag has been specified when creating or parsing the JSON data.

返回值

The address of the JSON value with the specified key. If the given 'Key$' does not exist in the object, the result is 0.

示例

  Input$ = "{ " + Chr(34) + "x" + Chr(34) + ": 10, " + 
                  Chr(34) + "y" + Chr(34) + ": 20, " + 
                  Chr(34) + "z" + Chr(34) + ": 30 }"
  
  ParseJSON(0, Input$)
  
  Debug GetJSONInteger(GetJSONMember(JSONValue(0), "x"))
  Debug GetJSONInteger(GetJSONMember(JSONValue(0), "y"))
  Debug GetJSONInteger(GetJSONMember(JSONValue(0), "y"))

参阅

SetJSONObject(), AddJSONMember(), RemoveJSONMember(), ClearJSONMembers(), ExamineJSONMembers(), JSONObjectSize(), JSONType()

已支持操作系统

所有

<- GetJSONInteger() - Json Index - GetJSONQuad() ->