This project has moved and is read-only. For the latest updates, please go here.

New to JSON - help appreciated!

Nov 29, 2012 at 10:42 AM


I've been given a JSON project to complete. Getting used to it very slowly!

Here is what I have to decode:

"[ {   "id": 1,   "result": {   "status": "loggedIn"   },   "method": "admin.login" }, {   "id": 2,   "result": {   "version": "1.0"   },   "method": "admin.getVersion" }, {   "id": 3,   "result": {   "status": "loggedOut"   },   "method": "admin.logout" } ]"

I'm trying to retrieve the version number. This is only the tip of the iceberg of what I'm trying to do but is a good strating point.

I'm at this stage in my code:

Dim Items = Newtonsoft.Json.JsonConvert.DeserializeObject(responseString)

(Where the responseString is the JSON text above)

 I'm sending an array of three commands: logging on to a server, getting the API version, and logging off. The responseString is returned.

I want to extract the data intelligently from the 'items', I know that you can decode to arrays etc but not sure of the best approach to do this. I'm programming in VB.NET.

Any help and pointers would be very appreciated.


Many Thanks, Paul

Aug 14, 2013 at 6:58 AM
I have same question, please can anyone help out ?? There is really noone who doing stuff in anymore ??