Parsing array in JSON using ASP.NET C# -
i using following tutorial parse json document. http://www.drowningintechnicaldebt.com/shawnweisfeld/archive/2010/08/22/using-c-4.0-and-dynamic-to-parse-json.aspx
the json document trying parse can accessed here: http://www.visitproject.co.uk/tweets/ireland.txt
javascriptserializer jss = new javascriptserializer(); jss.registerconverters(new javascriptconverter[] { new dynamicjsonconverter() }); dynamic tweets = jss.deserialize(json, typeof(object)) dynamic; foreach (var tweettext in tweets.statuses.text) { console.writeline("tweet: " + tweettext); }
i able perform watch on tweets.statuses , contain collection of tweets. text value each tweet. thing can see different tutorial is array in json , expect why not working. have ideas? thank help!
you use linq json, this:
// parse json jobject o = jobject.parse(json);
read linq json documentation details on how query pieces of json want.
Comments
Post a Comment