Sample code for 30+ languages & platforms
VB.NET

JSON AppendArray2 Example

Demonstrates the AppendArray2 function.

Chilkat VB.NET Downloads

VB.NET
Dim json As New Chilkat.JsonObject
json.Load("{ ""name"": ""John"", ""marbles"": 100 }")

' Append an empty array named "xyz"
Dim jarr As New Chilkat.JsonArray
json.AppendArray2("xyz",jarr)

Debug.WriteLine(json.Emit())
' Expected output is:   {"name":"John","marbles":100,"xyz":[]}

' Add elements to the array.
jarr.AddStringAt(-1,"hello")
jarr.AddIntAt(-1,256)

Debug.WriteLine(json.Emit())
' Expected output is:  {"name":"John","marbles":100,"xyz":["hello",256]}