How can I JSON encode an array in VB.NET?
35,122
Solution 1
Dim serializer as New JavaScriptSerializer()
Dim arrayJson as String = serializer.Serialize(myArray)
Solution 2
You are going to want to look into JSON serialization. Here is a good article that explains one way to do it (unfortunately the examples are in C#) but with more information we can probalby steer you towards the right toolkit.
Comments
-
pixeldev almost 4 years
I need to pass back a JSON result for a routine I am working with. In
VB.NET
, how can arrays be JSON encoded? -
Sameer Alibhai over 12 yearsusing System.Web.Script.Serialization;
-
Ashish Kumar about 4 yearsThe link that you are referring to is dead.