End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
JSON#parse!
JSON.parse!(source, opts) → object
ext/json/lib/json/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/ext/json/lib/json/common.rb, line 230
def parse!(source, opts = {})
opts = {
:max_nesting => false,
:allow_nan => true
}.merge(opts)
Parser.new(source, **(opts||{})).parse
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.