Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
66
rated 0 times [  73] [ 7]  / answers: 1 / hits: 22679  / 15 Years ago, tue, september 1, 2009, 12:00:00

I have some JS that runs fine in FF and IE but in Chrome I see the following error:




uncaught exception ReferenceError: JSON is not defined




I presume I need to include something but I'm not sure what. Help?
Also, any clue why this might work on IE/FF but not Chrome?



Btw, I'm using JSON.stringify() in my script.



UPDATE: JSON.stringify is now available in chrome (couldn't find when it was introduced).


More From » json

 Answers
11

The JSON object is not yet part of the standard IIRC, but is expected to be soon. In the meantime, browsers are free to implement it at will, and that's probably what you are seeing here.



Your best bet is to get a separate library that does the same thing and use it for the meantime until native implementations are more widespread. You can find a very good one here (Link at the bottom).


[#98782] Friday, August 28, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
daryldeontaeh

Total Points: 46
Total Questions: 97
Total Answers: 105

Location: Maldives
Member since Sat, Jan 29, 2022
2 Years ago
;