Contact Me

Nirav Prabtani

Mobile : +91 738 308 2188

Email : niravjprabtani@gmail.com

Nirav Prabtani

Monday 21 April 2014

How to Convert JSON String into Dataset using c#



We can easily convert json string into Dataset using c#
To use that ,you must have to doenload  Json.NET
Json.NET is a popular high-performance JSON framework for .NET
To install Json.NET, run the following command in the Package Manager Console


 DataSet dsRecognize = new DataSet();
                    string jsonStringRecognize = "Json String";
                    XmlDocument xdRecognize = new XmlDocument();
                    jsonStringRecognize = "{ \"rootNode\": {" + jsonStringRecognize.Trim().TrimStart('{').TrimEnd('}') + "} }";
                    xdRecognize = (XmlDocument)JsonConvert.DeserializeXmlNode(jsonStringRecognize);

                    dsRecognize.ReadXml(new XmlNodeReader(xdRecognize));


2 comments :

  1. This comment has been removed by the author.

    ReplyDelete
  2. Top 5 Titanium hoop earrings for men, women, and other men
    Top 5 Titanium hoop earrings for men, women, and other men · titanium nose hoop Shop #1 with #1 titanium nitride coating service near me · #2 with #3 with #4 · #5 with #6 · #6 with #7 nier titanium alloy with #8 with black titanium fallout 76 #9 titanium quartz with #10

    ReplyDelete