0

I want to know how can I convert JSON string to XML string in ASP.NET 1.1

I can not use third party library for some restriction.

Any suggestion would be a big help.

James
  • 2,136
  • 3
  • 23
  • 42

1 Answers1

4

You have to deserialize this JSON into an object and then, serialize this object again in XML. I think this is a simple approach.

msancho
  • 181
  • 1
  • 6
  • Whatever way I am finding to convert Json to object are for framework 3.5 and above..Can you suggest for 1.1, if any – James Nov 06 '12 at 12:14
  • I'm afraid the problem is being in asp.net 1.1, I've found this other question [here](http://stackoverflow.com/questions/7207238/json-for-net-framework-1-1) that ask for using JSON in version 1.1 and they encourage to upgrade the framework, but it seems this is not in your hands. What you can always do, and it's not a good idea, is to manually parse the JSON string and build a translated XML Object. It's not a good idea and makes me cry! sorry :( – msancho Nov 06 '12 at 13:39
  • 3
    you can always show that to your CTO: http://cdn.memegenerator.net/instances/400x/29701086.jpg :) – Jordi Nov 06 '12 at 13:53
  • Cant we serialize the json object to xml in Jquery???That will be framework independent.. – James Nov 06 '12 at 14:07
  • I've fount [this](http://stackoverflow.com/questions/1773550/xml-json-conversion-in-javascript) question that talks about XML/JSON conversion in jQuery, maybe it works for you! :) – msancho Nov 06 '12 at 14:08