robnhood00
asked on
Convert vb.net object to JSON
Is there an easy way to convert an object to JSON in Vb.net? Something like object.ToJSON?
Public Class MyURL
Public Property URL As String
Public Property Description As String
Public Property DateAdded As String
End Class
Protected Sub form1_Load(sender As Object, e As EventArgs) Handles form1.Load
Dim p As New MyURL
Dim s As New List(Of MyURL)
p.URL = "http://google.com"
p.Description = "Test Item 1"
p.DateAdded = "1/1/2013"
s.Add(p)
p.URL = "http://yahoo.com"
p.Description = "Test Item 2"
p.DateAdded = "12/15/2012"
s.Add(p)
'Is there a simple toJSON function that can be used?
response.write(s.toJson)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window