I have a Json string that comes from another project to my C# project. I want to convert this object to Dataset (list of Datatables).
I got this error:
Additional text found in JSON string after finishing deserializing object.
This is my sample json:
{
"list":[
[
256,
181940,
635346,
0,
1,
5696109,
18350,
0,
0,
"232",
1
],
[
"id",
"Factorid",
"classid",
"hostid",
"ownerid",
"orderid",
"userid",
"LastOrder",
"NextOrder",
"note",
"used"
]
],
"list2":[
[
"ID",
"MID",
"OwnerID",
"Ord",
"Enabled",
"schemaID",
"LastUpdate",
"createDate",
"parentid",
"General"
],
[
1207054,
20,
1,
1000,
1,
40,
"2015-01-11 03:18:24.143000",
"2015-01-08 22:55:17.930000",
0,
0
],
[
1207126,
20,
1,
1000,
1,
40,
"2015-01-12 02:59:15.227000",
"2015-01-12 01:37:10.317000",
0,
0
]
]
}
It's ok and will be converted to JObject
with this method:
JObject jo = JObject.Parse(jsonString);
I've searched stackoverflow but didn't find any answer that was solved. Everybody says first define a class that maps to json object, but json comes to my project, may have different structures which in many situations won't map to class created for it.
The question is how can I dynamically convert every json to Dataset which comes to my project?