Visual FoxPro
Visual FoxPro
JSON Append String Array
See more JSON Examples
Demonstrates how to append an array of strings from a string table object.Note: This example uses the AppendStringTable method, which was introduced in Chilkat v9.5.0.67
Chilkat Visual FoxPro Downloads
LOCAL loJson
LOCAL loSt
loJson = CreateObject('Chilkat.JsonObject')
loJson.EmitCompact = 0
loJson.AppendString("abc","123")
loSt = CreateObject('Chilkat.StringTable')
loSt.Append("a")
loSt.Append("b")
loSt.Append("c")
loSt.Append("d")
loJson.AppendStringArray("strArray",loSt)
? loJson.Emit()
* Output:
* {
* "abc": "123",
* "strArray": [
* "a",
* "b",
* "c",
* "d"
* ]
* }
RELEASE loJson
RELEASE loSt