Sample code for 30+ languages & platforms
VB.NET

Example: JsonObject.NewArrayOf method

See more JSON Examples

Demonstrates the NewArrayOf method.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

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

Dim json As New Chilkat.JsonObject

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

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


json.EmitCompact = False
Debug.WriteLine(json.Emit())

' Result:

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