SetJSONString()

Syntax

SetJSONString(JSONValue, String$)
Description
Change the type of the JSON value to #PB_JSON_String and store the given string.

Parameters

JSONValue The JSON value.
String$ The string to store.

Return value

None.

Example

  If CreateJSON(0)
    ArrayValue = SetJSONArray(JSONValue(0))
    SetJSONString(AddJSONElement(ArrayValue), "with escaped new" + Chr(13) + Chr(10) + "line")
    SetJSONString(AddJSONElement(ArrayValue), "with escaped \ backslash")
    
    Debug ComposeJSON(0)
  EndIf

See Also

GetJSONString(), SetJSONArray(), SetJSONBoolean(), SetJSONDouble(), SetJSONFloat(), SetJSONInteger(), SetJSONNull(), SetJSONObject(), SetJSONQuad()

Supported OS

All

<- SetJSONQuad() - Json Index