Sample code for 30+ languages & platforms
Visual Basic 6.0 Requires Chilkat v11.4.0+

Example: JsonObject.NewArrayOf method

See more JSON Examples

Demonstrates the NewArrayOf method.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

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

Dim json As New ChilkatJsonObject

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

success = json.NewArrayOf("big_cats",big_cats)
If (success = 0) Then
    Debug.Print json.LastErrorText
    Exit Sub
End If

json.EmitCompact = 0
Debug.Print json.Emit()

'  Result:

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