summaryrefslogtreecommitdiff
path: root/lib/json/common.rb
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2016-06-02 21:13:53 +0200
committerFlorian Frank <flori@ping.de>2016-06-02 21:13:53 +0200
commit10d54d93ec145578063947951acd9f1777ea9245 (patch)
tree6418b6c2ac1f4c5525188901f9bf86340d69f43b /lib/json/common.rb
parent7d2ad6d6556da03300a5aeadeeacaec563435773 (diff)
downloadjson-10d54d93ec145578063947951acd9f1777ea9245.tar.gz
Use better name for this feature
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r--lib/json/common.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb
index 209c3e7..f01e7a1 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
- # :allow_null: true
+ # :allow_blank: true
attr_accessor :load_default_options
end
self.load_default_options = {
:max_nesting => false,
:allow_nan => true,
- :allow_null => true,
+ :allow_blank => true,
:create_additions => true,
}
@@ -328,7 +328,7 @@ module JSON
elsif source.respond_to?(:read)
source = source.read
end
- if opts[:allow_null] && (source.nil? || source.empty?)
+ if opts[:allow_blank] && (source.nil? || source.empty?)
source = 'null'
end
result = parse(source, opts)
@@ -357,7 +357,7 @@ module JSON
# The global default options for the JSON.dump method:
# :max_nesting: false
# :allow_nan: true
- # :allow_null: true
+ # :allow_blank: true
attr_accessor :dump_default_options
end
self.dump_default_options = {