From ad03de84222bb2773d25b53e5fc862e44dd6f47c Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 28 Nov 2007 09:22:57 +0000 Subject: * ext/json, lib/json, test/json: Update to JSON 1.1.2. (RubyForge#15447) * math.c: fix typo. -- M ChangeLog M math.c M ext/json/ext/generator/generator.c M ext/json/ext/parser/parser.rl M ext/json/ext/parser/parser.c M lib/json/version.rb M lib/json/editor.rb M lib/json/common.rb M lib/json/pure/parser.rb M test/json/test_json_unicode.rb M test/json/test_json_fixtures.rb M test/json/test_json_generate.rb M test/json/test_json_addition.rb M test/json/test_json.rb M test/json/runner.rb git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/json/common.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/json/common.rb') diff --git a/lib/json/common.rb b/lib/json/common.rb index c988677a1..7bc5ae065 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -115,6 +115,9 @@ module JSON # * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in # defiance of RFC 4627 to be parsed by the Parser. 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. def parse(source, opts = {}) JSON.parser.new(source, opts).parse end @@ -131,6 +134,9 @@ module JSON # * *allow_nan*: If set to true, allow NaN, Infinity, and -Infinity in # defiance of RFC 4627 to be parsed by the Parser. This option defaults # to true. + # * *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. def parse!(source, opts = {}) opts = { :max_nesting => false, @@ -161,6 +167,9 @@ module JSON # * *allow_nan*: true if NaN, Infinity, and -Infinity should be # generated, otherwise an exception is thrown, if these values are # encountered. This options defaults to false. + # * *max_nesting*: The maximum depth of nesting allowed in the data + # structures from which JSON is to be generated. Disable depth checking + # with :max_nesting => false, it defaults to 19. # # See also the fast_generate for the fastest creation method with the least # amount of sanity checks, and the pretty_generate method for some -- cgit