Xbase++
Xbase++
Create JSON Array of Strings
See more JSON Examples
Demonstrates how to create a JSON array of strings.Chilkat Xbase++ Downloads
LOCAL oJarr
// The goal of this example is to produce this:
// [
// "tag1",
// "tag2",
// "tag3"
// ]
oJarr := CreateObject("Chilkat.JsonArray")
oJarr:AddStringAt(-1, "tag1")
oJarr:AddStringAt(-1, "tag2")
oJarr:AddStringAt(-1, "tag3")
oJarr:EmitCompact := 0
? oJarr:Emit()
oJarr:destroy()