Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
35
rated 0 times [  37] [ 2]  / answers: 1 / hits: 56142  / 15 Years ago, sat, september 26, 2009, 12:00:00

In JavaScript, what are the alternatives of JSON.stringify() for browsers that do not have native JSON support? Thanks


More From » json

 Answers
62

You should use the library json2.js. It is the basis for the standard JSON.stringify(...) that some browsers include natively.



You can find the page it originated from here: https://github.com/douglascrockford/JSON-js/blob/master/json2.js



The script automatically makes sure it only adds a JSON.stringify(...) method if it doesn't already exist so there is no danger including it in a browser that has it.


[#98616] Tuesday, September 22, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dusty

Total Points: 739
Total Questions: 97
Total Answers: 85

Location: Angola
Member since Wed, Apr 13, 2022
2 Years ago
;