isJSON
isJSON() -> boolean
Check if the string is valid JSON by the use of regular expressions. This security method is called internally.
Examples
"something".isJSON()
// -> false
"\"something\"".isJSON()
// -> true
"{ foo: 42 }".isJSON()
// -> false
"{ \"foo\": 42 }".isJSON()
// -> true
© 2006-2008 Prototype Core Team
© 2009 перевод Иванов Егор
© 2009 перевод Иванов Егор