JsonConvert.DeserializeObject convert into dynamic datatable 1

JsonConvert.DeserializeObject convert into dynamic datatable

DataTable dt = (DataTable)JsonConvert.DeserializeObject(jsonText, (typeof(DataTable)));

Here is what the above code is Doing:
1. It’s creating a DataTable object.
2. It’s adding a column to the DataTable object.
3. It’s adding a row to the DataTable object.
4. It’s serializing the DataTable object to a JSON string.
5. It’s deserializing the JSON string back to a DataTable object.

Similar Posts