Friday, 15 May 2015

.net - How to parse json feed in c#? -



.net - How to parse json feed in c#? -

how can parse json feed in c#?

i tried next far:

string fileurl = "http://itunes.apple.com/rss/customerreviews/id=123456789/json"; var jsonstr = new webclient().downloadstring(fileurl); javascriptserializer serializer = new javascriptserializer(); var jsonobject = serializer.deserialize<idictionary<string, object>>(jsonstr);

once dictionary<string, object> dic1 = new dictionary<string, object>(); using above code.

i iterate value object[] shown below.

foreach (keyvaluepair<string, object> d in dic1) { var k = d.key; var v = d.value; }

now value system.object[] type can help me parse object shown in below image? i'm new help great!

i tend utilize json.net in situations this. there illustration here parses rss feed using linq,

http://james.newtonking.com/projects/json/help/

there selecttoken method queries parsed json using path syntax.

c# .net asp.net-mvc object dictionary

No comments:

Post a Comment