This post shows you how to parse string to json and then back again.
String to Json
- var doc = null;
- try {
- doc = JSON.parse(value);
- }
- catch(ex) {
- //handle exception
- }
Json to string
- JSON.stringify(value));
A place for tutorials on programming and other such works.
This post shows you how to parse string to json and then back again.
- var doc = null;
- try {
- doc = JSON.parse(value);
- }
- catch(ex) {
- //handle exception
- }
- JSON.stringify(value));