Sample code for 30+ languages & platforms
Lianja

Create JSON Array of Strings

See more JSON Examples

Demonstrates how to create a JSON array of strings.

Chilkat Lianja Downloads

Lianja
// The goal of this example is to produce this:

// [
//   "tag1",
//   "tag2",
//   "tag3"
// ]

loJarr = createobject("CkJsonArray")
loJarr.AddStringAt(-1,"tag1")
loJarr.AddStringAt(-1,"tag2")
loJarr.AddStringAt(-1,"tag3")

loJarr.EmitCompact = .F.
? loJarr.Emit()


release loJarr