How to convert xml data into JSON format. I want to send it over the SOAP, too.
Could you provide some example?
How to convert xml data into JSON format. I want to send it over the SOAP, too.
Could you provide some example?
You can use JsonConvert class to convert.
here is the code
// To convert an XML node contained in string xml into a JSON string
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
string jsonText = JsonConvert.SerializeXmlNode(doc);
// To convert JSON text contained in string json into an XML node
XmlDocument doc = JsonConvert.DeserializeXmlNode(json);
The above code is from here How to convert JSON to XML or XML to JSON?
For sending data through soap Client to send SOAP request and received response