How to parse json string to dataset in C#

Parse json string to dataset in C#.

// Serialization of DataSet to json string

StringWriter sw = new StringWriter();
versionUpGetData.WriteXml(sw, XmlWriteMode.WriteSchema);

XmlDocument xd =
new XmlDocument();
xd.LoadXml(sw.ToString());

String jsonText = JsonConvert.SerializeXmlNode(xd);

File.WriteAllText(“d:/datasetJson.txt”,jsonText);
 

//Deserialization of Json String to DataSet

XmlDocument xd1 = new XmlDocument();
xd1 = (XmlDocument)JsonConvert.DeserializeXmlNode(jsonText);

DataSet jsonDataSet =
new DataSet();
jsonDataSet.ReadXml(
new XmlNodeReader(xd1));