# File lib/json/pure/parser.rb, line 66 66: def initialize(source, opts = {}) 67: super 68: if !opts.key?(:max_nesting) # defaults to 19 69: @max_nesting = 19 70: elsif opts[:max_nesting] 71: @max_nesting = opts[:max_nesting] 72: else 73: @max_nesting = 0 74: end 75: @allow_nan = !!opts[:allow_nan] 76: ca = true 77: ca = opts[:create_additions] if opts.key?(:create_additions) 78: @create_id = ca ? JSON.create_id : nil 79: @object_class = opts[:object_class] || Hash 80: @array_class = opts[:array_class] || Array 81: end