r/visualbasic • u/BA_humphrey • Dec 11 '18
JSON in VB .NET
I am stuck. Can anyone help me?
Problem is this:
I can't get this JSON to parse with newton soft JSON in .net 3.5 This code seems to make it happy but then when it tried to deserialize it crashes.
What is it about the class LEGALLAND that is not quite right?
Public Class LEGALLAND Public success As Boolean Public type As String Public features As Feature End Class
{ "success":true, "type":"FeatureCollection", "features": [ { "type":"Feature", "properties": { "DLSSHORT":"2-2-2-W4", "QUARTER":"", "SECTION":"2", "TOWNSHIP":"2", "RANGE":"2", "MERIDIAN":"W4", "PROVINCE":"Alberta", "COUNTY":"CypressCounty", "LATITUDE":49.093639, "LONGITUDE":-110.173043, "ZOOM":14, "MGRS":"12UWV6037138194", "UTM":"12N5603725438195", "NTS":"B-14-G/72-E-1", "PID":"402002020" }, "geometry": { "type":"Polygon", "coordinates": [ [ [-110.162055,49.086400], [-110.162039,49.100866], [-110.184014,49.100879], [-110.184063,49.086410], [-110.162055,49.086400] ] ] } } ] }
1
u/andrewsmd87 Web Specialist Dec 11 '18
what is the error you get and what is the declaration of your feature class look like. Also, it really helps if you can format your code when you post. Highlight your code and use the little <> button to format it so it's readable.