src code

instance method String#isJSON

String#isJSON() → Boolean

Check if the string is valid JSON by the use of regular expressions. This security method is called internally.