diff options
author | Florian Frank <flori@ping.de> | 2016-06-02 21:13:53 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2016-06-02 21:13:53 +0200 |
commit | 10d54d93ec145578063947951acd9f1777ea9245 (patch) | |
tree | 6418b6c2ac1f4c5525188901f9bf86340d69f43b /lib/json/common.rb | |
parent | 7d2ad6d6556da03300a5aeadeeacaec563435773 (diff) | |
download | json-10d54d93ec145578063947951acd9f1777ea9245.tar.gz |
Use better name for this feature
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r-- | lib/json/common.rb | 8 |
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 = { |