JSON parsing using JSON.net

Posted by vbNewbie on Stack Overflow See other posts from Stack Overflow or by vbNewbie
Published on 2011-02-15T15:22:21Z Indexed on 2011/02/15 15:25 UTC
Read the original article Hit count: 249

I am accessing the facebook api and using the json.net library (newtonsoft.json.net) I declare a Jobject to parse the content and look for the specific elements and get their values. Everything works fine for the first few but then I get this unexplained nullexception error " (Object reference not set to an instance of an object)

Now I took a look at the declaration but cannot see how to change it. Any help appreciated:

Dim jobj as JObject = JObject.Parse(responseData)
Dim message as string = string.empty
message = jobj("message").tostring

The error occurs at the last line above.

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about visual