ExamineJSONMembers()

语法

Result = ExamineJSONMembers(JSONValue)
概要
Starts to examine the members of a JSON value of type #PB_JSON_Object. The individual members can be examined with the NextJSONMember(), JSONMemberKey() and JSONMemberValue() functions.

参数

JSONValue The JSON value to examine. The value must be of type #PB_JSON_Object.

返回值

Returns nonzero if the object can be enumerated or zero if there was an error.

示例

  Input$ = "{ " + Chr(34) + "x" + Chr(34) + ": 10, " + 
                  Chr(34) + "y" + Chr(34) + ": 20, " + 
                  Chr(34) + "z" + Chr(34) + ": 30 }"
  
  ParseJSON(0, Input$)
  ObjectValue = JSONValue(0)
  
  If ExamineJSONMembers(ObjectValue)
    While NextJSONMember(ObjectValue)
      Debug JSONMemberKey(ObjectValue) + " = " + GetJSONInteger(JSONMemberValue(ObjectValue))
    Wend
  EndIf

参阅

NextJSONMember(), JSONMemberKey(), JSONMemberValue(), GetJSONMember(), SetJSONObject(), JSONType()

已支持操作系统

所有

<- CreateJSON() - Json Index - ExportJSON() ->