I am having issues parsing JSON data from a web service. The web service is local on my machine, and I have added it as a Web Reference. Simple data types from the service work perfectly. However, if I call a method that returns a complex structure (such as an array of structures), the object values are Nothing.
For instance,
Dim ClientOffices As New Object
ClientOffices = NTGateway.GetClientOffices()
gives me an object with 31 item objects, all of which are empty.
This is the data that is returned from the web service method:
[{"Name":"Corporate Office","ID":1},{"Name":"Satellite Office","ID":43},{"Name":"Melville","ID":1370},{"N ame":"Orlando","ID":1383},{"Name":"terry","ID":138 5},{"Name":"marty","ID":1386},{"Name":1.0,"ID":138 7},{"Name":"dallas","ID":1389},{"Name":"Demo Company","ID":1391},{"Name":"Levi","ID":1436},{"Na me":"Broward","ID":1439},{"Name":"Morgan","ID":150 5},{"Name":"Scott","ID":1623},{"Name":"Katie","ID" :1625},{"Name":"Miami","ID":2183},{"Name":"Adapt", "ID":2190},{"Name":"High Point","ID":2604},{"Name":"Chicago","ID":2612},{"N ame":"jim","ID":2647},{"Name":"Hawaii","ID":2666}, {"Name":"Custom Solutions","ID":2669},{"Name":"Tina","ID":2886},{" Name":"Greensboro","ID":3027},{"Name":"Melissa","I D":3799},{"Name":"High Point","ID":3815},{"Name":"Education","ID":3996},{ "Name":"Med Surg","ID":3997},{"Name":"ER","ID":3998},{"Name":" critical care","ID":3999},{"Name":"Critical care","ID":4103},{"Name":"Main Office","ID":4192}]
It works if I use a jQuery parser, but I can't seem to get the same results in VB.
Thanks