Method: JSON.parse!
- Defined in:
- lib/json/common.rb
.parse!(source, opts = nil) ⇒ Object
:call-seq:
JSON.parse!(source, opts) -> object
Calls
parse(source, opts)
with source and possibly modified opts.
Differences from JSON.parse:
-
Option
max_nesting, if not provided, defaults tofalse, which disables checking for nesting depth. -
Option
allow_nan, if not provided, defaults totrue.
375 376 377 378 379 380 381 |
# File 'lib/json/common.rb', line 375 def parse!(source, opts = nil) if opts.nil? parse(source, PARSE_L_OPTIONS) else parse(source, PARSE_L_OPTIONS.merge(opts)) end end |