skip to Main Content

Facing issue while deserializing the jsonstring

I am trying to deserialize json string to datable and I am getting format error. string str = "{"Arg1":"Arg1Value","Arg2":"Arg2Value","DataArray":[{"Id": "2222","VehicleNo": "234354","Amount":"1000"},{"Id":"2226","VehicleNo":"2343","Amount":"2000"}]"}"; DataTable data = Newtonsoft.Json.JsonConvert.DeserializeObject<DataTable>(str); Error: Unexpected JSON token when reading DataTable. Expected StartArray, got StartObject. Path '', line 1,…

VIEW QUESTION
Back To Top
Search