SetJSONObject()

语法

SetJSONObject(JSONValue)
概要
Change the type of the JSON value to #PB_JSON_Object. The object will have no members (even if the value previously contained object members).

参数

JSONValue The JSON value.

返回值

无.

示例

  If CreateJSON(0)
    ObjectValue = SetJSONObject(JSONValue(0))
    SetJSONInteger(AddJSONMember(ObjectValue, "x"), 10)
    SetJSONInteger(AddJSONMember(ObjectValue, "y"), 20)
    SetJSONInteger(AddJSONMember(ObjectValue, "z"), 30)

    Debug ComposeJSON(0, #PB_JSON_PrettyPrint)
  EndIf

参阅

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

已支持操作系统

所有

<- SetJSONNull() - Json Index - SetJSONQuad() ->