diff options
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r-- | lib/json/common.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb index 32d9892..8fbaa2b 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -148,7 +148,7 @@ module JSON # the default. # * *create_additions*: If set to false, the Parser doesn't create # additions even if a matching class and create_id was found. This option - # defaults to false. + # defaults to true. # * *object_class*: Defaults to Hash # * *array_class*: Defaults to Array def parse(source, opts = {}) @@ -169,7 +169,7 @@ module JSON # to true. # * *create_additions*: If set to false, the Parser doesn't create # additions even if a matching class and create_id was found. This option - # defaults to false. + # defaults to true. def parse!(source, opts = {}) opts = { :max_nesting => false, @@ -390,7 +390,7 @@ module JSON end end opts = JSON.dump_default_options - opts = opts.merge(:max_nesting => limit) if limit + limit and opts.update(:max_nesting => limit) result = generate(obj, opts) if anIO anIO.write result @@ -411,7 +411,7 @@ module JSON string end - # Shortcut for iconv. + # Shortuct for iconv. if ::String.method_defined?(:encode) # Encodes string using Ruby's _String.encode_ def self.iconv(to, from, string) @@ -448,7 +448,7 @@ module ::Kernel nil end - # Ouputs _objs_ to STDOUT as JSON strings in a pretty format, with + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. def jj(*objs) objs.each do |obj| |