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
2009-08-26 12:57:29
haha beat me by 20 secs!
Preet Sangha
2009-08-26 12:58:30
I was typing check out but I mistyped and then did the whole line again. lol
Preet Sangha
2009-08-26 13:00:02
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
2009-08-26 19:11:06
+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
2009-08-26 13:13:11