summaryrefslogtreecommitdiff
path: root/lib/json/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r--lib/json/common.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb
index c47938f..209c3e7 100644
--- a/lib/json/common.rb
+++ b/lib/json/common.rb
@@ -295,13 +295,13 @@ module JSON
# The global default options for the JSON.load method:
# :max_nesting: false
# :allow_nan: true
- # :quirks_mode: true
+ # :allow_null: true
attr_accessor :load_default_options
end
self.load_default_options = {
:max_nesting => false,
:allow_nan => true,
- :quirks_mode => true,
+ :allow_null => true,
:create_additions => true,
}
@@ -328,7 +328,7 @@ module JSON
elsif source.respond_to?(:read)
source = source.read
end
- if opts[:quirks_mode] && (source.nil? || source.empty?)
+ if opts[:allow_null] && (source.nil? || source.empty?)
source = 'null'
end
result = parse(source, opts)
@@ -357,13 +357,12 @@ module JSON
# The global default options for the JSON.dump method:
# :max_nesting: false
# :allow_nan: true
- # :quirks_mode: true
+ # :allow_null: true
attr_accessor :dump_default_options
end
self.dump_default_options = {
:max_nesting => false,
:allow_nan => true,
- :quirks_mode => true,
}
# Dumps _obj_ as a JSON string, i.e. calls generate on the object and returns