Need to introduce JsonConvert.
1. Convert DataTable to Json:
JsonConvert.SerializeObject(dataTable);
2. Convert Json to DataTable
Many bloggers on the Internet use regular analysis and other kinds of analysis. In fact, they don’t need a single code:
DataTable dt = (DataTable)JsonConvert.DeserializeObject(json, (typeof(DataTable)));