Method: JSON.parse

Defined in:
lib/crazy_ivan/vendor/json-1.1.7/lib/json/common.rb

.parse(source, opts = {}) ⇒ Object

Parse the JSON string source into a Ruby data structure and return it.

opts can have the following keys:

  • max_nesting: The maximum depth of nesting allowed in the parsed data structures. Disable depth checking with :max_nesting => false, it defaults to 19.

  • allow_nan: If set to true, allow NaN, Infinity and -Infinity in defiance of RFC 4627 to be parsed by the Parser. This option defaults to false.

  • create_additions: If set to false, the Parser doesn’t create additions even if a matchin class and create_id was found. This option defaults to true.



121
122
123
# File 'lib/crazy_ivan/vendor/json-1.1.7/lib/json/common.rb', line 121

def parse(source, opts = {})
  JSON.parser.new(source, opts).parse
end