Sample code for 30+ languages & platforms
Xojo Plugin

Example: JsonObject.NewArrayOf method

See more JSON Examples

Demonstrates the NewArrayOf method.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim big_cats As String
big_cats = "[""lion"",""tiger"",""leopard"",""jaguar"",""cheetah"",""snow leopard"",""clouded leopard"",""cougar"",""puma"",""panther""]"

Dim json As New Chilkat.JsonObject

success = json.UpdateString("test","abc")

success = json.NewArrayOf("big_cats",big_cats)
If (success = False) Then
    System.DebugLog(json.LastErrorText)
    Return
End If

json.EmitCompact = False
System.DebugLog(json.Emit())

// Result:

// {
//   "test": "abc",
//   "big_cats": [
//     "lion",
//     "tiger",
//     "leopard",
//     "jaguar",
//     "cheetah",
//     "snow leopard",
//     "clouded leopard",
//     "cougar",
//     "puma",
//     "panther"
//   ]
// }