tags:

views:

1012

answers:

3

Hi, how to decode a json response in c#?

+4  A: 

Check out the DataContractJsonSerializer. You'll have to target .NET 3.5, which means Visual Studio 2008 is pretty much required. Here's a good blog post about using the Json data contract serializer.

Will
haha beat me by 20 secs!
Preet Sangha
+1  A: 

See here for info on the DataContractJsonSerializer

Preet Sangha
HAH! Beat you to it!
Will
I was typing check out but I mistyped and then did the whole line again. lol
Preet Sangha
thank you all.. im not that much familier with .net and need to use a json data . So it will be greatful if anyone can give a code sample stating how to decode the the json data
raki
+2  A: 

In addition to the 3.5 methods above, if you install the ASP.NET 2.0 AJAX Extensions 1.0 (2.0 is the framework version), you will gain the System.Web.Script.Serialization.JavaScriptSerializer class, which can encode/decode json.

R. Bemrose