SetJSONObject()

Syntax

SetJSONObject(JSONValue)
Description
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).

Parameters

JSONValue The JSON value.

Return value

None.

Example

  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

See Also

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

Supported OS

All

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