lib/json/pure/parser.rb in json_pure-1.5.5 vs lib/json/pure/parser.rb in json_pure-1.6.0

- old
+ new

@@ -61,13 +61,13 @@ # defiance of RFC 4627 to be parsed by the Parser. This option defaults # to false. # * *symbolize_names*: If set to true, returns symbols for the names # (keys) in a JSON object. Otherwise strings are returned, which is also # the default. - # * *create_additions*: If set to true, the Parser creates - # additions when if a matching class and create_id was found. 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. # * *object_class*: Defaults to Hash # * *array_class*: Defaults to Array # * *quirks_mode*: Enables quirks_mode for parser, that is for example # parsing single JSON values instead of documents is possible. def initialize(source, opts = {}) @@ -86,10 +86,10 @@ @allow_nan = !!opts[:allow_nan] @symbolize_names = !!opts[:symbolize_names] if opts.key?(:create_additions) @create_additions = !!opts[:create_additions] else - @create_additions = false + @create_additions = true end @create_id = @create_additions ? JSON.create_id : nil @object_class = opts[:object_class] || Hash @array_class = opts[:array_class] || Array @match_string = opts[:match_string]