1 : I have an XML object which I serialized and stored in a hidden
field.2 : Then I deserialized the string and made it in xml object and
retrieved the values and stored them in database.
The above were working fine.
But now I am facing a situation where by jQuery ajax I am getting the same object in JSON format.
Problem:
1 : If I again serialize and deseilize the JSON object the code to
save into database has to be written again as per the JSON object.2 : JSON.stringify is not supported in old IE browsers.
PLease suggest me how I should be dealing with this situation.
Should I convert the JSON to XML after the jQuery ajax call ??
Should I write code to save both XML and JSON format individually ??
Check json2.js as an alternative way. Most of the files in this collection are for applications that are expected to run in obsolete web browsers. For most purposes, json2.js
is the best choice.
You should check this post in other thread
Alternatives of JSON.stringify() in JavaScript