json 1.8.5 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/{CHANGES → CHANGES.md} +248 -95
- data/LICENSE +56 -0
- data/README.md +188 -108
- data/VERSION +1 -1
- data/ext/json/ext/fbuffer/fbuffer.h +0 -3
- data/ext/json/ext/generator/generator.c +229 -113
- data/ext/json/ext/generator/generator.h +5 -4
- data/ext/json/ext/parser/extconf.rb +29 -0
- data/ext/json/ext/parser/parser.c +3022 -1915
- data/ext/json/ext/parser/parser.h +10 -6
- data/ext/json/ext/parser/parser.rl +210 -187
- data/ext/json/extconf.rb +1 -1
- data/json.gemspec +0 -0
- data/lib/json/add/bigdecimal.rb +3 -2
- data/lib/json/add/complex.rb +4 -4
- data/lib/json/add/core.rb +1 -0
- data/lib/json/add/date.rb +1 -1
- data/lib/json/add/date_time.rb +1 -1
- data/lib/json/add/exception.rb +1 -1
- data/lib/json/add/ostruct.rb +3 -3
- data/lib/json/add/range.rb +1 -1
- data/lib/json/add/rational.rb +3 -3
- data/lib/json/add/regexp.rb +3 -3
- data/lib/json/add/set.rb +29 -0
- data/lib/json/add/struct.rb +1 -1
- data/lib/json/add/symbol.rb +1 -1
- data/lib/json/add/time.rb +1 -1
- data/lib/json/common.rb +381 -162
- data/lib/json/ext.rb +0 -6
- data/lib/json/generic_object.rb +5 -4
- data/lib/json/pure/generator.rb +73 -124
- data/lib/json/pure/parser.rb +64 -86
- data/lib/json/pure.rb +2 -8
- data/lib/json/version.rb +2 -1
- data/lib/json.rb +550 -29
- metadata +20 -127
- data/.gitignore +0 -17
- data/.travis.yml +0 -18
- data/Gemfile +0 -7
- data/README-json-jruby.markdown +0 -33
- data/Rakefile +0 -402
- data/TODO +0 -1
- data/data/example.json +0 -1
- data/data/index.html +0 -38
- data/data/prototype.js +0 -4184
- data/diagrams/.keep +0 -0
- data/install.rb +0 -23
- data/java/src/json/ext/ByteListTranscoder.java +0 -166
- data/java/src/json/ext/Generator.java +0 -446
- data/java/src/json/ext/GeneratorMethods.java +0 -231
- data/java/src/json/ext/GeneratorService.java +0 -42
- data/java/src/json/ext/GeneratorState.java +0 -542
- data/java/src/json/ext/OptionsReader.java +0 -113
- data/java/src/json/ext/Parser.java +0 -2644
- data/java/src/json/ext/Parser.rl +0 -968
- data/java/src/json/ext/ParserService.java +0 -34
- data/java/src/json/ext/RuntimeInfo.java +0 -120
- data/java/src/json/ext/StringDecoder.java +0 -166
- data/java/src/json/ext/StringEncoder.java +0 -111
- data/java/src/json/ext/Utils.java +0 -88
- data/json-java.gemspec +0 -38
- data/json_pure.gemspec +0 -37
- data/lib/json/ext/.keep +0 -0
- data/tests/fixtures/fail1.json +0 -1
- data/tests/fixtures/fail10.json +0 -1
- data/tests/fixtures/fail11.json +0 -1
- data/tests/fixtures/fail12.json +0 -1
- data/tests/fixtures/fail13.json +0 -1
- data/tests/fixtures/fail14.json +0 -1
- data/tests/fixtures/fail18.json +0 -1
- data/tests/fixtures/fail19.json +0 -1
- data/tests/fixtures/fail2.json +0 -1
- data/tests/fixtures/fail20.json +0 -1
- data/tests/fixtures/fail21.json +0 -1
- data/tests/fixtures/fail22.json +0 -1
- data/tests/fixtures/fail23.json +0 -1
- data/tests/fixtures/fail24.json +0 -1
- data/tests/fixtures/fail25.json +0 -1
- data/tests/fixtures/fail27.json +0 -2
- data/tests/fixtures/fail28.json +0 -2
- data/tests/fixtures/fail3.json +0 -1
- data/tests/fixtures/fail4.json +0 -1
- data/tests/fixtures/fail5.json +0 -1
- data/tests/fixtures/fail6.json +0 -1
- data/tests/fixtures/fail7.json +0 -1
- data/tests/fixtures/fail8.json +0 -1
- data/tests/fixtures/fail9.json +0 -1
- data/tests/fixtures/pass1.json +0 -56
- data/tests/fixtures/pass15.json +0 -1
- data/tests/fixtures/pass16.json +0 -1
- data/tests/fixtures/pass17.json +0 -1
- data/tests/fixtures/pass2.json +0 -1
- data/tests/fixtures/pass26.json +0 -1
- data/tests/fixtures/pass3.json +0 -6
- data/tests/setup_variant.rb +0 -11
- data/tests/test_json.rb +0 -519
- data/tests/test_json_addition.rb +0 -196
- data/tests/test_json_encoding.rb +0 -65
- data/tests/test_json_fixtures.rb +0 -35
- data/tests/test_json_generate.rb +0 -348
- data/tests/test_json_generic_object.rb +0 -75
- data/tests/test_json_string_matching.rb +0 -39
- data/tests/test_json_unicode.rb +0 -72
- data/tools/diff.sh +0 -18
- data/tools/fuzz.rb +0 -139
- data/tools/server.rb +0 -62
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: dc2f560520b0ab901bb8e064664fc74f0c818947048be8519ec8828c14573009
|
|
4
|
+
data.tar.gz: 91463f0e0c677b0f431780da2362324a00d3f51baf7ea77485636dee2b400c6b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6eea451caa191ebe5a93de37238799d2b04ce0657f23a1098243c996a1d5047322c276241c0adb8ffe60cdd8436d46488edcd7aaebb8e2065c7406b387a4b553
|
|
7
|
+
data.tar.gz: d5cd65f836be70cc02c078589c20c98a85995d75f71a6d02be7bedb5a43d7bc02538859f7fe621eedbe2112a29dc8bc57f995a51c336cc36b85b53a38f82becb
|
data/{CHANGES → CHANGES.md}
RENAMED
|
@@ -1,4 +1,102 @@
|
|
|
1
|
-
|
|
1
|
+
# Changes
|
|
2
|
+
|
|
3
|
+
### 2021-10-24 (2.6.1)
|
|
4
|
+
|
|
5
|
+
* Restore version.rb with 2.6.1
|
|
6
|
+
|
|
7
|
+
### 2021-10-14 (2.6.0)
|
|
8
|
+
|
|
9
|
+
* Use `rb_enc_interned_str` if available to reduce allocations in `freeze: true` mode. #451.
|
|
10
|
+
* Bump required_ruby_version to 2.3.
|
|
11
|
+
* Fix compatibility with `GC.compact`.
|
|
12
|
+
* Fix some compilation warnings. #469
|
|
13
|
+
|
|
14
|
+
## 2020-12-22 (2.5.1)
|
|
15
|
+
|
|
16
|
+
* Restore the compatibility for constants of JSON class.
|
|
17
|
+
|
|
18
|
+
## 2020-12-22 (2.5.0)
|
|
19
|
+
|
|
20
|
+
* Ready to Ractor-safe at Ruby 3.0.
|
|
21
|
+
|
|
22
|
+
## 2020-12-17 (2.4.1)
|
|
23
|
+
|
|
24
|
+
* Restore version.rb with 2.4.1
|
|
25
|
+
|
|
26
|
+
## 2020-12-15 (2.4.0)
|
|
27
|
+
|
|
28
|
+
* Implement a freeze: parser option #447
|
|
29
|
+
* Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations #449
|
|
30
|
+
* Fix JSON.load_file doc #448
|
|
31
|
+
* Fix pure parser with unclosed arrays / objects #425
|
|
32
|
+
* bundle the LICENSE file in the gem #444
|
|
33
|
+
* Add an option to escape forward slash character #405
|
|
34
|
+
* RDoc for JSON #439 #446 #442 #434 #433 #430
|
|
35
|
+
|
|
36
|
+
## 2020-06-30 (2.3.1)
|
|
37
|
+
|
|
38
|
+
* Spelling and grammar fixes for comments. Pull request #191 by Josh
|
|
39
|
+
Kline.
|
|
40
|
+
* Enhance generic JSON and #generate docs. Pull request #347 by Victor
|
|
41
|
+
Shepelev.
|
|
42
|
+
* Add :nodoc: for GeneratorMethods. Pull request #349 by Victor Shepelev.
|
|
43
|
+
* Baseline changes to help (JRuby) development. Pull request #371 by Karol
|
|
44
|
+
Bucek.
|
|
45
|
+
* Add metadata for rubygems.org. Pull request #379 by Alexandre ZANNI.
|
|
46
|
+
* Remove invalid JSON.generate description from JSON module rdoc. Pull
|
|
47
|
+
request #384 by Jeremy Evans.
|
|
48
|
+
* Test with TruffleRuby in CI. Pull request #402 by Benoit Daloze.
|
|
49
|
+
* Rdoc enhancements. Pull request #413 by Burdette Lamar.
|
|
50
|
+
* Fixtures/ are not being tested... Pull request #416 by Marc-André
|
|
51
|
+
Lafortune.
|
|
52
|
+
* Use frozen string for hash key. Pull request #420 by Marc-André
|
|
53
|
+
Lafortune.
|
|
54
|
+
* Added :call-seq: to RDoc for some methods. Pull request #422 by Burdette
|
|
55
|
+
Lamar.
|
|
56
|
+
* Small typo fix. Pull request #423 by Marc-André Lafortune.
|
|
57
|
+
|
|
58
|
+
## 2019-12-11 (2.3.0)
|
|
59
|
+
* Fix default of `create_additions` to always be `false` for `JSON(user_input)`
|
|
60
|
+
and `JSON.parse(user_input, nil)`.
|
|
61
|
+
Note that `JSON.load` remains with default `true` and is meant for internal
|
|
62
|
+
serialization of trusted data. [CVE-2020-10663]
|
|
63
|
+
* Fix passing args all #to_json in json/add/*.
|
|
64
|
+
* Fix encoding issues
|
|
65
|
+
* Fix issues of keyword vs positional parameter
|
|
66
|
+
* Fix JSON::Parser against bigdecimal updates
|
|
67
|
+
* Bug fixes to JRuby port
|
|
68
|
+
|
|
69
|
+
## 2019-02-21 (2.2.0)
|
|
70
|
+
* Adds support for 2.6 BigDecimal and ruby standard library Set datetype.
|
|
71
|
+
|
|
72
|
+
## 2017-04-18 (2.1.0)
|
|
73
|
+
* Allow passing of `decimal_class` option to specify a class as which to parse
|
|
74
|
+
JSON float numbers.
|
|
75
|
+
## 2017-03-23 (2.0.4)
|
|
76
|
+
* Raise exception for incomplete unicode surrogates/character escape
|
|
77
|
+
sequences. This problem was reported by Daniel Gollahon (dgollahon).
|
|
78
|
+
* Fix arbitrary heap exposure problem. This problem was reported by Ahmad
|
|
79
|
+
Sherif (ahmadsherif).
|
|
80
|
+
|
|
81
|
+
## 2017-01-12 (2.0.3)
|
|
82
|
+
* Set `required_ruby_version` to 1.9
|
|
83
|
+
* Some small fixes
|
|
84
|
+
|
|
85
|
+
## 2016-07-26 (2.0.2)
|
|
86
|
+
* Specify `required_ruby_version` for json\_pure.
|
|
87
|
+
* Fix issue #295 failure when parsing frozen strings.
|
|
88
|
+
|
|
89
|
+
## 2016-07-01 (2.0.1)
|
|
90
|
+
* Fix problem when requiring json\_pure and Parser constant was defined top
|
|
91
|
+
level.
|
|
92
|
+
* Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
|
|
93
|
+
* Store `current_nesting` on stack by Aaron Patterson.
|
|
94
|
+
|
|
95
|
+
## 2015-09-11 (2.0.0)
|
|
96
|
+
* Now complies to newest JSON RFC 7159.
|
|
97
|
+
* Implements compatibility to ruby 2.4 integer unification.
|
|
98
|
+
* Drops support for old rubies whose life has ended, that is rubies < 2.0.
|
|
99
|
+
Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
|
|
2
100
|
* There were still some mentions of dual GPL licensing in the source, but JSON
|
|
3
101
|
has just the Ruby license that itself includes an explicit dual-licensing
|
|
4
102
|
clause that allows covered software to be distributed under the terms of
|
|
@@ -6,98 +104,119 @@
|
|
|
6
104
|
however a GPL compatible license according to the Free Software Foundation.
|
|
7
105
|
I changed these mentions to be consistent with the Ruby license setting in
|
|
8
106
|
the gemspec files which were already correct now.
|
|
9
|
-
|
|
10
|
-
2015-06-01 (1.8.3)
|
|
107
|
+
|
|
108
|
+
## 2015-06-01 (1.8.3)
|
|
11
109
|
* Fix potential memory leak, thx to nobu.
|
|
12
|
-
|
|
110
|
+
|
|
111
|
+
## 2015-01-08 (1.8.2)
|
|
13
112
|
* Some performance improvements by Vipul A M <vipulnsward@gmail.com>.
|
|
14
113
|
* Fix by Jason R. Clark <jclark@newrelic.com> to avoid mutation of
|
|
15
|
-
JSON.dump_default_options
|
|
114
|
+
`JSON.dump_default_options`.
|
|
16
115
|
* More tests by Michael Mac-Vicar <mmacvicar@gmail.com> and fixing
|
|
17
|
-
space_before accessor in generator.
|
|
18
|
-
* Performance on Jruby
|
|
116
|
+
`space_before` accessor in generator.
|
|
117
|
+
* Performance on Jruby improved by Ben Browning <bbrownin@redhat.com>.
|
|
19
118
|
* Some fixes to be compatible with the new Ruby 2.2 by Zachary Scott <e@zzak.io>
|
|
20
119
|
and SHIBATA Hiroshi <hsbt@ruby-lang.org>.
|
|
21
|
-
|
|
120
|
+
|
|
121
|
+
## 2013-05-13 (1.8.1)
|
|
22
122
|
* Remove Rubinius exception since transcoding should be working now.
|
|
23
|
-
|
|
123
|
+
|
|
124
|
+
## 2013-05-13 (1.8.0)
|
|
24
125
|
* Fix https://github.com/flori/json/issues/162 reported by Marc-Andre
|
|
25
126
|
Lafortune <github_rocks@marc-andre.ca>. Thanks!
|
|
26
127
|
* Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with
|
|
27
128
|
-Wchar-subscripts and better validate UTF-8 strings.
|
|
28
129
|
* Applied patch by ginriki@github to remove unnecessary if.
|
|
29
|
-
* Add load/dump interface to JSON::GenericObject to make
|
|
30
|
-
serialize :some_attribute, JSON::GenericObject
|
|
31
|
-
work in Rails active models for convenient SomeModel#some_attribute.foo.bar
|
|
130
|
+
* Add load/dump interface to `JSON::GenericObject` to make
|
|
131
|
+
serialize :some_attribute, `JSON::GenericObject`
|
|
132
|
+
work in Rails active models for convenient `SomeModel#some_attribute.foo.bar`
|
|
32
133
|
access to serialised JSON data.
|
|
33
|
-
|
|
134
|
+
|
|
135
|
+
## 2013-02-04 (1.7.7)
|
|
34
136
|
* Security fix for JSON create_additions default value and
|
|
35
|
-
JSON::GenericObject
|
|
36
|
-
|
|
37
|
-
using the JSON.load/dump interface. If JSON::GenericObject is supposed to
|
|
38
|
-
be automatically deserialised, this has to be
|
|
137
|
+
`JSON::GenericObject`. It should not be possible to create additions unless
|
|
138
|
+
explicitly requested by setting the create_additions argument to true or
|
|
139
|
+
using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
|
|
140
|
+
be automatically deserialised, this has to be explicitly enabled by
|
|
39
141
|
setting
|
|
40
|
-
|
|
142
|
+
JSON::GenericObject.json_creatable = true
|
|
41
143
|
as well.
|
|
42
144
|
* Remove useless assert in fbuffer implementation.
|
|
43
145
|
* Apply patch attached to https://github.com/flori/json/issues#issue/155
|
|
44
146
|
provided by John Shahid <jvshahid@gmail.com>, Thx!
|
|
45
147
|
* Add license information to rubygems spec data, reported by Jordi Massaguer Pla <jmassaguerpla@suse.de>.
|
|
46
148
|
* Improve documentation, thx to Zachary Scott <zachary@zacharyscott.net>.
|
|
47
|
-
|
|
48
|
-
|
|
149
|
+
|
|
150
|
+
## 2012-11-29 (1.7.6)
|
|
151
|
+
* Add `GeneratorState#merge` alias for JRuby, fix state accessor methods. Thx to
|
|
49
152
|
jvshahid@github.
|
|
50
153
|
* Increase hash likeness of state objects.
|
|
51
|
-
|
|
154
|
+
|
|
155
|
+
## 2012-08-17 (1.7.5)
|
|
52
156
|
* Fix compilation of extension on older rubies.
|
|
53
|
-
|
|
157
|
+
|
|
158
|
+
## 2012-07-26 (1.7.4)
|
|
54
159
|
* Fix compilation problem on AIX, see https://github.com/flori/json/issues/142
|
|
55
|
-
|
|
160
|
+
|
|
161
|
+
## 2012-05-12 (1.7.3)
|
|
56
162
|
* Work around Rubinius encoding issues using iconv for conversion instead.
|
|
57
|
-
|
|
163
|
+
|
|
164
|
+
## 2012-05-11 (1.7.2)
|
|
58
165
|
* Fix some encoding issues, that cause problems for the pure and the
|
|
59
166
|
extension variant in jruby 1.9 mode.
|
|
60
|
-
|
|
167
|
+
|
|
168
|
+
## 2012-04-28 (1.7.1)
|
|
61
169
|
* Some small fixes for building
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
170
|
+
|
|
171
|
+
## 2012-04-28 (1.7.0)
|
|
172
|
+
* Add `JSON::GenericObject` for method access to objects transmitted via JSON.
|
|
173
|
+
|
|
174
|
+
## 2012-04-27 (1.6.7)
|
|
65
175
|
* Fix possible crash when trying to parse nil value.
|
|
66
|
-
|
|
176
|
+
|
|
177
|
+
## 2012-02-11 (1.6.6)
|
|
67
178
|
* Propagate src encoding to values made from it (fixes 1.9 mode converting
|
|
68
179
|
everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo
|
|
69
180
|
<tom.enebo@gmail.com>), should fix
|
|
70
181
|
https://github.com/flori/json/issues#issue/119.
|
|
71
182
|
* Fix https://github.com/flori/json/issues#issue/124 Thx to Jason Hutchens.
|
|
72
183
|
* Fix https://github.com/flori/json/issues#issue/117
|
|
73
|
-
|
|
184
|
+
|
|
185
|
+
## 2012-01-15 (1.6.5)
|
|
74
186
|
* Vit Ondruch <v.ondruch@tiscali.cz> reported a bug that shows up when using
|
|
75
187
|
optimisation under GCC 4.7. Thx to him, Bohuslav Kabrda
|
|
76
188
|
<bkabrda@redhat.com> and Yui NARUSE <naruse@airemix.jp> for debugging and
|
|
77
189
|
developing a patch fix.
|
|
78
|
-
|
|
190
|
+
|
|
191
|
+
## 2011-12-24 (1.6.4)
|
|
79
192
|
* Patches that improve speed on JRuby contributed by Charles Oliver Nutter
|
|
80
193
|
<headius@headius.com>.
|
|
81
|
-
* Support object_class
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
194
|
+
* Support `object_class`/`array_class` with duck typed hash/array.
|
|
195
|
+
|
|
196
|
+
## 2011-12-01 (1.6.3)
|
|
197
|
+
* Let `JSON.load('')` return nil as well to make mysql text columns (default to
|
|
198
|
+
`''`) work better for serialization.
|
|
199
|
+
|
|
200
|
+
## 2011-11-21 (1.6.2)
|
|
86
201
|
* Add support for OpenStruct and BigDecimal.
|
|
87
|
-
* Fix bug when parsing nil in quirks_mode
|
|
202
|
+
* Fix bug when parsing nil in `quirks_mode`.
|
|
88
203
|
* Make JSON.dump and JSON.load methods better cooperate with Rails' serialize
|
|
89
|
-
method. Just use:
|
|
204
|
+
method. Just use:
|
|
205
|
+
serialize :value, JSON
|
|
90
206
|
* Fix bug with time serialization concerning nanoseconds. Thanks for the
|
|
91
207
|
patch go to Josh Partlow (jpartlow@github).
|
|
92
208
|
* Improve parsing speed for JSON numbers (integers and floats) in a similar way to
|
|
93
209
|
what Evan Phoenix <evan@phx.io> suggested in:
|
|
94
210
|
https://github.com/flori/json/pull/103
|
|
95
|
-
|
|
211
|
+
|
|
212
|
+
## 2011-09-18 (1.6.1)
|
|
96
213
|
* Using -target 1.5 to force Java bits to compile with 1.5.
|
|
97
|
-
|
|
214
|
+
|
|
215
|
+
## 2011-09-12 (1.6.0)
|
|
98
216
|
* Extract utilities (prettifier and GUI-editor) in its own gem json-utils.
|
|
99
217
|
* Split json/add/core into different files for classes to be serialised.
|
|
100
|
-
|
|
218
|
+
|
|
219
|
+
## 2011-08-31 (1.5.4)
|
|
101
220
|
* Fix memory leak when used from multiple JRuby. (Patch by
|
|
102
221
|
jfirebaugh@github).
|
|
103
222
|
* Apply patch by Eric Wong <nocode@yhbt.net> that fixes garbage collection problem
|
|
@@ -105,42 +224,50 @@
|
|
|
105
224
|
* Add :quirks_mode option to parser and generator.
|
|
106
225
|
* Add support for Rational and Complex number additions via json/add/complex
|
|
107
226
|
and json/add/rational requires.
|
|
108
|
-
|
|
227
|
+
|
|
228
|
+
## 2011-06-20 (1.5.3)
|
|
109
229
|
* Alias State#configure method as State#merge to increase duck type synonymy with Hash.
|
|
110
|
-
* Add as_json methods in json/add/core, so rails can create its json objects
|
|
230
|
+
* Add `as_json` methods in json/add/core, so rails can create its json objects
|
|
111
231
|
the new way.
|
|
112
|
-
|
|
232
|
+
|
|
233
|
+
## 2011-05-11 (1.5.2)
|
|
113
234
|
* Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
|
|
114
|
-
* Add gemspecs for json and
|
|
235
|
+
* Add gemspecs for json and json\_pure.
|
|
115
236
|
* Fix bug in jruby pretty printing.
|
|
116
|
-
* Fix bug in object_class and array_class when inheriting from Hash or
|
|
117
|
-
|
|
237
|
+
* Fix bug in `object_class` and `array_class` when inheriting from Hash or
|
|
238
|
+
Array.
|
|
239
|
+
|
|
240
|
+
## 2011-01-24 (1.5.1)
|
|
118
241
|
* Made rake-compiler build a fat binary gem. This should fix issue
|
|
119
242
|
https://github.com/flori/json/issues#issue/54.
|
|
120
|
-
|
|
243
|
+
|
|
244
|
+
## 2011-01-22 (1.5.0)
|
|
121
245
|
* Included Java source codes for the Jruby extension made by Daniel Luz
|
|
122
246
|
<dev@mernen.com>.
|
|
123
|
-
* Output full exception message of deep_const_get to aid debugging.
|
|
124
|
-
* Fixed an issue with ruby 1.9 Module#const_defined
|
|
247
|
+
* Output full exception message of `deep_const_get` to aid debugging.
|
|
248
|
+
* Fixed an issue with ruby 1.9 `Module#const_defined?` method, that was
|
|
125
249
|
reported by Riley Goodside.
|
|
126
|
-
|
|
250
|
+
|
|
251
|
+
## 2010-08-09 (1.4.6)
|
|
127
252
|
* Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23,
|
|
128
253
|
always create a new object from the state prototype.
|
|
129
254
|
* Made pure and ext api more similar again.
|
|
130
|
-
|
|
255
|
+
|
|
256
|
+
## 2010-08-07 (1.4.5)
|
|
131
257
|
* Manage data structure nesting depth in state object during generation. This
|
|
132
|
-
should reduce problems with to_json method definіtions that only have one
|
|
258
|
+
should reduce problems with `to_json` method definіtions that only have one
|
|
133
259
|
argument.
|
|
134
260
|
* Some fixes in the state objects and additional tests.
|
|
135
|
-
2010-08-06 (1.4.4)
|
|
261
|
+
## 2010-08-06 (1.4.4)
|
|
136
262
|
* Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25
|
|
137
263
|
* Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and
|
|
138
264
|
http://github.com/flori/json/issues/closed#issue/23
|
|
139
|
-
2010-05-05 (1.4.3)
|
|
265
|
+
## 2010-05-05 (1.4.3)
|
|
140
266
|
* Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
|
|
141
267
|
* Fixed issue http://github.com/flori/json/issues/#issue/20 reported by
|
|
142
268
|
electronicwhisper@github. Thx!
|
|
143
|
-
|
|
269
|
+
|
|
270
|
+
## 2010-04-26 (1.4.2)
|
|
144
271
|
* Applied patch from naruse Yui NARUSE <naruse@airemix.com> to make building with
|
|
145
272
|
Microsoft Visual C possible again.
|
|
146
273
|
* Applied patch from devrandom <c1.github@niftybox.net> in order to allow building of
|
|
@@ -148,34 +275,43 @@
|
|
|
148
275
|
* Thanks to Dustin Schneider <dustin@stocktwits.com>, who reported a memory
|
|
149
276
|
leak, which is fixed in this release.
|
|
150
277
|
* Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github.
|
|
151
|
-
|
|
278
|
+
|
|
279
|
+
## 2010-04-25 (1.4.1)
|
|
152
280
|
* Fix for a bug reported by Dan DeLeo <dan@kallistec.com>, caused by T_FIXNUM
|
|
153
281
|
being different on 32bit/64bit architectures.
|
|
154
|
-
|
|
282
|
+
|
|
283
|
+
## 2010-04-23 (1.4.0)
|
|
155
284
|
* Major speed improvements and building with simplified
|
|
156
285
|
directory/file-structure.
|
|
157
|
-
* Extension should at least be
|
|
158
|
-
|
|
286
|
+
* Extension should at least be compatible with MRI, YARV and Rubinius.
|
|
287
|
+
|
|
288
|
+
## 2010-04-07 (1.2.4)
|
|
159
289
|
* Triger const_missing callback to make Rails' dynamic class loading work.
|
|
160
|
-
|
|
161
|
-
|
|
290
|
+
|
|
291
|
+
## 2010-03-11 (1.2.3)
|
|
292
|
+
* Added a `State#[]` method which returns an attribute's value in order to
|
|
162
293
|
increase duck type compatibility to Hash.
|
|
163
|
-
|
|
294
|
+
|
|
295
|
+
## 2010-02-27 (1.2.2)
|
|
164
296
|
* Made some changes to make the building of the parser/generator compatible
|
|
165
297
|
to Rubinius.
|
|
166
|
-
|
|
167
|
-
|
|
298
|
+
|
|
299
|
+
## 2009-11-25 (1.2.1)
|
|
300
|
+
* Added `:symbolize_names` option to Parser, which returns symbols instead of
|
|
168
301
|
strings in object names/keys.
|
|
169
|
-
|
|
170
|
-
|
|
302
|
+
|
|
303
|
+
## 2009-10-01 (1.2.0)
|
|
304
|
+
* `fast_generate` now raises an exception for nan and infinite floats.
|
|
171
305
|
* On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
|
|
172
306
|
and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
|
|
173
307
|
functions are used to convert from all supported encodings. ASCII-8BIT
|
|
174
308
|
encoded strings are handled like all strings under Ruby 1.8 were.
|
|
175
309
|
* Better documentation
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
310
|
+
|
|
311
|
+
## 2009-08-23 (1.1.9)
|
|
312
|
+
* Added forgotten main doc file `extra_rdoc_files`.
|
|
313
|
+
|
|
314
|
+
## 2009-08-23 (1.1.8)
|
|
179
315
|
* Applied a patch by OZAWA Sakuro <sakuro@2238club.org> to make json/pure
|
|
180
316
|
work in environments that don't provide iconv.
|
|
181
317
|
* Applied patch by okkez_ in order to fix Ruby Bug #1768:
|
|
@@ -183,7 +319,8 @@
|
|
|
183
319
|
* Finally got around to avoid the rather paranoid escaping of ?/ characters
|
|
184
320
|
in the generator's output. The parsers aren't affected by this change.
|
|
185
321
|
Thanks to Rich Apodaca <rapodaca@metamolecular.com> for the suggestion.
|
|
186
|
-
|
|
322
|
+
|
|
323
|
+
## 2009-06-29 (1.1.7)
|
|
187
324
|
* Security Fix for JSON::Pure::Parser. A specially designed string could
|
|
188
325
|
cause catastrophic backtracking in one of the parser's regular expressions
|
|
189
326
|
in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
|
|
@@ -191,16 +328,19 @@
|
|
|
191
328
|
problem.
|
|
192
329
|
* This release also uses a less strict ruby version requirement for the
|
|
193
330
|
creation of the mswin32 native gem.
|
|
194
|
-
|
|
331
|
+
|
|
332
|
+
## 2009-05-10 (1.1.6)
|
|
195
333
|
* No changes. І tested native linux gems in the last release and they don't
|
|
196
334
|
play well with different ruby versions other than the one the gem was built
|
|
197
335
|
with. This release is just to bump the version number in order to skip the
|
|
198
336
|
native gem on rubyforge.
|
|
199
|
-
|
|
337
|
+
|
|
338
|
+
## 2009-05-10 (1.1.5)
|
|
200
339
|
* Started to build gems with rake-compiler gem.
|
|
201
340
|
* Applied patch object/array class patch from Brian Candler
|
|
202
341
|
<B.Candler@pobox.com> and fixes.
|
|
203
|
-
|
|
342
|
+
|
|
343
|
+
## 2009-04-01 (1.1.4)
|
|
204
344
|
* Fixed a bug in the creation of serialized generic rails objects reported by
|
|
205
345
|
Friedrich Graeter <graeter@hydrixos.org>.
|
|
206
346
|
* Deleted tests/runner.rb, we're using testrb instead.
|
|
@@ -209,7 +349,8 @@
|
|
|
209
349
|
1.9.
|
|
210
350
|
* Improved speed of the code path for the fast_generate method in the pure
|
|
211
351
|
variant.
|
|
212
|
-
|
|
352
|
+
|
|
353
|
+
## 2008-07-10 (1.1.3)
|
|
213
354
|
* Wesley Beary <monki@geemus.com> reported a bug in json/add/core's DateTime
|
|
214
355
|
handling: If the nominator and denominator of the offset were divisible by
|
|
215
356
|
each other Ruby's Rational#to_s returns them as an integer not a fraction
|
|
@@ -219,7 +360,8 @@
|
|
|
219
360
|
* Supports ragel >= 6.0 now.
|
|
220
361
|
* Corrected some tests.
|
|
221
362
|
* Some minor changes.
|
|
222
|
-
|
|
363
|
+
|
|
364
|
+
## 2007-11-27 (1.1.2)
|
|
223
365
|
* Remember default dir (last used directory) in editor.
|
|
224
366
|
* JSON::Editor.edit method added, the editor can now receive json texts from
|
|
225
367
|
the clipboard via C-v.
|
|
@@ -235,13 +377,14 @@
|
|
|
235
377
|
generator by returning something other than a String instance from a
|
|
236
378
|
to_json method. I now guard against this by doing a rather crude type
|
|
237
379
|
check, which raises an exception instead of crashing.
|
|
238
|
-
|
|
380
|
+
|
|
381
|
+
## 2007-07-06 (1.1.1)
|
|
239
382
|
* Yui NARUSE <naruse@airemix.com> sent some patches to fix tests for Ruby
|
|
240
383
|
1.9. I applied them and adapted some of them a bit to run both on 1.8 and
|
|
241
384
|
1.9.
|
|
242
|
-
* Introduced a JSON.parse
|
|
243
|
-
danger.
|
|
244
|
-
* Made generate and pretty_generate methods configurable by an options hash.
|
|
385
|
+
* Introduced a `JSON.parse!` method without depth checking for people who
|
|
386
|
+
like danger.
|
|
387
|
+
* Made generate and `pretty_generate` methods configurable by an options hash.
|
|
245
388
|
* Added :allow_nan option to parser and generator in order to handle NaN,
|
|
246
389
|
Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers,
|
|
247
390
|
aren't valid JSON according to RFC4627, so by default an exception will be
|
|
@@ -250,55 +393,65 @@
|
|
|
250
393
|
* Fixed some more tests for Ruby 1.9.
|
|
251
394
|
* Implemented dump/load interface of Marshal as suggested in ruby-core:11405
|
|
252
395
|
by murphy <murphy@rubychan.de>.
|
|
253
|
-
* Implemented the max_nesting feature for generate methods, too.
|
|
396
|
+
* Implemented the `max_nesting` feature for generate methods, too.
|
|
254
397
|
* Added some implementations for ruby core's custom objects for
|
|
255
398
|
serialisation/deserialisation purposes.
|
|
256
|
-
|
|
399
|
+
|
|
400
|
+
## 2007-05-21 (1.1.0)
|
|
257
401
|
* Implemented max_nesting feature for parser to avoid stack overflows for
|
|
258
402
|
data from untrusted sources. If you trust the source, you can disable it
|
|
259
403
|
with the option max_nesting => false.
|
|
260
404
|
* Piers Cawley <pdcawley@bofh.org.uk> reported a bug, that not every
|
|
261
|
-
character can be escaped by
|
|
405
|
+
character can be escaped by `\` as required by RFC4627. There's a
|
|
262
406
|
contradiction between David Crockford's JSON checker test vectors (in
|
|
263
407
|
tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
|
|
264
408
|
the JSON checker seems to be a bit older than the RFC.
|
|
265
409
|
* Extended license to Ruby License, which includes the GPL.
|
|
266
410
|
* Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb.
|
|
267
|
-
|
|
411
|
+
|
|
412
|
+
## 2007-05-09 (1.0.4)
|
|
268
413
|
* Applied a patch from Yui NARUSE <naruse@airemix.com> to make JSON compile
|
|
269
414
|
under Ruby 1.9. Thank you very much for mailing it to me!
|
|
270
415
|
* Made binary variants of JSON fail early, instead of falling back to the
|
|
271
416
|
pure version. This should avoid overshadowing of eventual problems while
|
|
272
417
|
loading of the binary.
|
|
273
|
-
|
|
418
|
+
|
|
419
|
+
## 2007-03-24 (1.0.3)
|
|
274
420
|
* Improved performance of pure variant a bit.
|
|
275
421
|
* The ext variant of this release supports the mswin32 platform. Ugh!
|
|
276
|
-
|
|
422
|
+
|
|
423
|
+
## 2007-03-24 (1.0.2)
|
|
277
424
|
* Ext Parser didn't parse 0e0 correctly into 0.0: Fixed!
|
|
278
|
-
|
|
425
|
+
|
|
426
|
+
## 2007-03-24 (1.0.1)
|
|
279
427
|
* Forgot some object files in the build dir. I really like that - not!
|
|
280
|
-
|
|
428
|
+
|
|
429
|
+
## 2007-03-24 (1.0.0)
|
|
281
430
|
* Added C implementations for the JSON generator and a ragel based JSON
|
|
282
431
|
parser in C.
|
|
283
432
|
* Much more tests, especially fixtures from json.org.
|
|
284
433
|
* Further improved conformance to RFC4627.
|
|
285
|
-
|
|
434
|
+
|
|
435
|
+
## 2007-02-09 (0.4.3)
|
|
286
436
|
* Conform more to RFC4627 for JSON: This means JSON strings
|
|
287
|
-
now always must contain exactly one object "{ ... }" or array "[ ... ]" in
|
|
437
|
+
now always must contain exactly one object `"{ ... }"` or array `"[ ... ]"` in
|
|
288
438
|
order to be parsed without raising an exception. The definition of what
|
|
289
439
|
constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
|
|
290
440
|
there are differences in floats and integers (no octals or hexadecimals) as
|
|
291
441
|
well.
|
|
292
|
-
* Added aliases generate and pretty_generate of unparse and pretty_unparse
|
|
442
|
+
* Added aliases generate and `pretty_generate` of unparse and `pretty_unparse`.
|
|
293
443
|
* Fixed a test case.
|
|
294
|
-
* Catch an Iconv::InvalidEncoding exception, that seems to occur on some Sun
|
|
444
|
+
* Catch an `Iconv::InvalidEncoding` exception, that seems to occur on some Sun
|
|
295
445
|
boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
|
|
296
446
|
reported by Andrew R Jackson <andrewj@bcm.tmc.edu>, thanks a bunch!
|
|
297
|
-
|
|
447
|
+
|
|
448
|
+
## 2006-08-25 (0.4.2)
|
|
298
449
|
* Fixed a bug in handling solidi (/-characters), that was reported by
|
|
299
450
|
Kevin Gilpin <kevin.gilpin@alum.mit.edu>.
|
|
300
|
-
|
|
451
|
+
|
|
452
|
+
## 2006-02-06 (0.4.1)
|
|
301
453
|
* Fixed a bug related to escaping with backslashes. Thanks for the report go
|
|
302
454
|
to Florian Munz <surf@theflow.de>.
|
|
303
|
-
|
|
455
|
+
|
|
456
|
+
## 2005-09-23 (0.4.0)
|
|
304
457
|
* Initial Rubyforge Version
|
data/LICENSE
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
|
4
|
+
|
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
|
6
|
+
software without restriction, provided that you duplicate all of the
|
|
7
|
+
original copyright notices and associated disclaimers.
|
|
8
|
+
|
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
|
10
|
+
you do at least ONE of the following:
|
|
11
|
+
|
|
12
|
+
a) place your modifications in the Public Domain or otherwise
|
|
13
|
+
make them Freely Available, such as by posting said
|
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
|
15
|
+
the author to include your modifications in the software.
|
|
16
|
+
|
|
17
|
+
b) use the modified software only within your corporation or
|
|
18
|
+
organization.
|
|
19
|
+
|
|
20
|
+
c) give non-standard binaries non-standard names, with
|
|
21
|
+
instructions on where to get the original software distribution.
|
|
22
|
+
|
|
23
|
+
d) make other distribution arrangements with the author.
|
|
24
|
+
|
|
25
|
+
3. You may distribute the software in object code or binary form,
|
|
26
|
+
provided that you do at least ONE of the following:
|
|
27
|
+
|
|
28
|
+
a) distribute the binaries and library files of the software,
|
|
29
|
+
together with instructions (in the manual page or equivalent)
|
|
30
|
+
on where to get the original distribution.
|
|
31
|
+
|
|
32
|
+
b) accompany the distribution with the machine-readable source of
|
|
33
|
+
the software.
|
|
34
|
+
|
|
35
|
+
c) give non-standard binaries non-standard names, with
|
|
36
|
+
instructions on where to get the original software distribution.
|
|
37
|
+
|
|
38
|
+
d) make other distribution arrangements with the author.
|
|
39
|
+
|
|
40
|
+
4. You may modify and include the part of the software into any other
|
|
41
|
+
software (possibly commercial). But some files in the distribution
|
|
42
|
+
are not written by the author, so that they are not under these terms.
|
|
43
|
+
|
|
44
|
+
For the list of those files and their copying conditions, see the
|
|
45
|
+
file LEGAL.
|
|
46
|
+
|
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
|
48
|
+
output from the software do not automatically fall under the
|
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
|
51
|
+
software.
|
|
52
|
+
|
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
56
|
+
PURPOSE.
|