Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to decode json data in C# windows form application?
Posted
Comments
[no name] 16-Jul-13 10:23am    
http://msdn.microsoft.com/en-us/library/gg538324(v=vs.111).aspx

Take a look for :

Json.net[^]
 
Share this answer
 
Comments
Member 10054218 18-Jul-13 10:09am    
how to decode following JSON data:
string json = @"{
""Movie"":{
""id"":102,
""name"":[""Aashiqui2"",""yeh jaawani hai Deewani"",""race"",""ramlila""]
""screen"":[""screen3"",""screen1"",""screen2"",""screen3"",""screen4""]
""time"":[""9:10"",""12:00"",""2:00"",""5:00"",""8:00"",""10:00""]
}
}";
[no name] 18-Jul-13 11:15am    
check this one :

http://csharpskill.blogspot.com/2012/08/jasontocsharp.html
[no name] 18-Jul-13 11:18am    
also you can try this website (generate c# classes from json):

http://json2csharp.com/

try on it this for example:
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
Try using this : fastJSON[^]

If you have the c# class file you can use ToObject() or if not you can use Parse().
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900