src code

instance method String#evalJSON

String#evalJSON([sanitize = false]) → object

Evaluates the JSON in the string and returns the resulting object.

If the optional sanitize parameter is set to true, the string is checked for possible malicious attempts; if one is detected, eval is not called.