VB.NET
VB.NET
Example: JsonObject.NewArrayOf method
See more JSON Examples
Demonstrates theNewArrayOf method.
Chilkat VB.NET Downloads
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"
' ]
' }