3
Reply

How to access Json object values individually

Avuya Mxoli

Avuya Mxoli

Jan 13 2014 4:00 AM
1.6k
Hi all,
 
I am using facebook graph API to get facebook statuses. The results are a json object which I can deserialize. Now what I want to do is get specific values from the json object to display. I came across tutorials that helped me create classes that match the structure of the json object so I can clearly see the properties etc. but now I want to be able to access them. I tried this: Object  statusJson = js.Deserialize<JsonObject>(reader.ReadToEnd()); which gives me a weird error so I am looking for another way to do this.
JsonObject is the class I created which inside it contains other classes that match the returned json object. Let me end here in case I confuse people, feel free to ask for more details.
 
using c# and asp.net (Visual studio 2012) 

Answers (3)