Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I got the json result as follows.
{
"HTTPStatusCode": "200",
"objFeedBackManagmentViewModel": [
{
"ID": 2,
"FeedBackDetail": "Email :trupti.undirwade@gandhibagh.com Mobile :9503628985 Category :Product Request Message :lookingFor",
"CreateDate": "2015-09-04T13:42:45"
},
{
"ID": 3,
"FeedBackDetail": "Email :sujatakullarkar@gmail.com Mobile :9503507124 Category :Product Request Message :lookingFor",
"CreateDate": "2015-09-04T18:06:44"
}
]
}



how to convert it into datatable

What I have tried:

I search a lot but unable to get proper solution
Posted
Updated 13-Sep-16 4:46am
Comments
[no name] 13-Sep-16 9:55am    
I got plenty of solutions googling, "c# convert json to datatable" and you got nothing at all?
vaibhavhedaoo 14-Sep-16 0:45am    
sir I also get list of solution which I implement but none of them work for me.

1 solution

Start here: c# - Convert JSON to DataTable - Stack Overflow[^] and/or here: Json to DataSet/DataTable[^]

Recommended method:
C#
DataTable tester = (DataTable) JsonConvert.DeserializeObject(json, (typeof(DataTable)));
 
Share this answer
 
Comments
BillWoodruff 13-Sep-16 12:09pm    
+5
Maciej Los 13-Sep-16 12:14pm    
Thank you, Bill.

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