I am absolutely new in Json stuff, following is one of my returned JSON string from one of the Internal REST API Call:
{
"odata.metadata":"https://ABC.XYZ.com/ERP10TESTNSSO/api/v1/Erp.BO.ABCCodeSvc/$metadata#Epicor.RestApi.ABCCodes/@Element",
"Company":"93100",
"ABCCode1":"A",
"CountFreq":1,
"ExcludeFromCC":false,
"StockValPcnt":"0",
"PcntTolerance":"0.00",
"CalcPcnt":false,
"CalcQty":false,
"CalcValue":false,
"QtyTolerance":"0",
"ValueTolerance":"0",
"ShipToCustNum":0,
"SysRevID":"6066188743",
"SysRowID":"5b7e2172-7f7a-445e-983d-f230e050153d",
"BitFlag":0,
"RowMod":""
}
Please let me know, how may I convert it into C# Data Table?
I tried following code (posted by another kind techie)
dynamic jsonObject = Newtonsoft.Json.JsonConvert.DeserializeObject(jsonContent);
DataTable dt = JsonConvert.DeserializeObject<DataTable>(Convert.ToString(jsonObject.Value));
But this code is throwing error at jsonObject.Value.
Please help me to fix it ...