locked
Converting JSON data to XML RRS feed

  • Question

  •  

    My webservice returning JSON data as output. Is it possible to convert JSON data into XML in .net?. Actually i need to store that data into Sql server. If its XML format we can use sp_XML_Preparedocument and openXML fuction for storing into database. So guide me in how to convert JSON to XML or hoe to store JSON data into Sqlserver using stored procedure. If both are possible which one is best way?
    Saturday, December 1, 2007 7:57 AM

Answers

  • Based on 2.0 this is how can do it:

     

    JSON data --> ASP.NET JSON DeSerialize --> .Net Object --> XmlSerializer Serialize --> Xml

     

    and reverse the process to get back the JSON.

     

    Monday, December 3, 2007 11:04 PM
    Moderator

All replies