instance method
JSON#parse!
(::string source, ?::JSON::options opts) -> untyped
JSON.parse!(source, opts) → object
ext/json/lib/json/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/ext/json/lib/json/common.rb, line 373
def parse!(source, opts = nil)
if opts.nil?
parse(source, PARSE_L_OPTIONS)
else
parse(source, PARSE_L_OPTIONS.merge(opts))
end
end
Calls
Example
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.