json 1.8.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of json might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -10
- data/{CHANGES → CHANGES.md} +183 -90
- data/Gemfile +11 -5
- data/{README-json-jruby.markdown → README-json-jruby.md} +0 -0
- data/{README.rdoc → README.md} +147 -113
- data/Rakefile +32 -36
- data/VERSION +1 -1
- data/ext/json/ext/fbuffer/fbuffer.h +0 -3
- data/ext/json/ext/generator/generator.c +46 -61
- data/ext/json/ext/generator/generator.h +7 -2
- data/ext/json/ext/parser/extconf.rb +3 -0
- data/ext/json/ext/parser/parser.c +353 -460
- data/ext/json/ext/parser/parser.h +4 -5
- data/ext/json/ext/parser/parser.rl +111 -181
- data/ext/json/extconf.rb +0 -1
- data/java/src/json/ext/ByteListTranscoder.java +1 -2
- data/java/src/json/ext/Generator.java +11 -12
- data/java/src/json/ext/GeneratorMethods.java +1 -2
- data/java/src/json/ext/GeneratorService.java +1 -2
- data/java/src/json/ext/GeneratorState.java +3 -56
- data/java/src/json/ext/OptionsReader.java +2 -3
- data/java/src/json/ext/Parser.java +135 -418
- data/java/src/json/ext/Parser.rl +48 -124
- data/java/src/json/ext/ParserService.java +1 -2
- data/java/src/json/ext/RuntimeInfo.java +1 -6
- data/java/src/json/ext/StringDecoder.java +1 -2
- data/java/src/json/ext/StringEncoder.java +5 -0
- data/java/src/json/ext/Utils.java +1 -2
- data/json-java.gemspec +15 -0
- data/json.gemspec +0 -0
- data/json_pure.gemspec +24 -26
- data/lib/json/add/bigdecimal.rb +1 -0
- data/lib/json/add/complex.rb +2 -1
- 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 +2 -2
- data/lib/json/add/range.rb +1 -1
- data/lib/json/add/rational.rb +1 -0
- data/lib/json/add/regexp.rb +1 -1
- 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 +24 -52
- data/lib/json/ext.rb +0 -6
- data/lib/json/generic_object.rb +5 -4
- data/lib/json/pure/generator.rb +61 -125
- data/lib/json/pure/parser.rb +33 -81
- data/lib/json/pure.rb +2 -8
- data/lib/json/version.rb +2 -1
- data/lib/json.rb +1 -0
- data/references/rfc7159.txt +899 -0
- data/tests/fixtures/obsolete_fail1.json +1 -0
- data/tests/{test_json_addition.rb → json_addition_test.rb} +22 -25
- data/tests/json_common_interface_test.rb +126 -0
- data/tests/json_encoding_test.rb +107 -0
- data/tests/json_ext_parser_test.rb +15 -0
- data/tests/{test_json_fixtures.rb → json_fixtures_test.rb} +5 -8
- data/tests/{test_json_generate.rb → json_generator_test.rb} +79 -39
- data/tests/{test_json_generic_object.rb → json_generic_object_test.rb} +15 -8
- data/tests/json_parser_test.rb +471 -0
- data/tests/json_string_matching_test.rb +38 -0
- data/tests/{setup_variant.rb → test_helper.rb} +10 -0
- data/tools/diff.sh +18 -0
- data/tools/fuzz.rb +1 -9
- metadata +28 -43
- data/COPYING +0 -58
- data/COPYING-json-jruby +0 -57
- data/GPL +0 -340
- data/TODO +0 -1
- data/tests/fixtures/fail1.json +0 -1
- data/tests/test_json.rb +0 -553
- data/tests/test_json_encoding.rb +0 -65
- data/tests/test_json_string_matching.rb +0 -39
- data/tests/test_json_unicode.rb +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24dd1ae30e921611bb63859bc67a08dc3fcb38b8
|
4
|
+
data.tar.gz: d89f05b4f72169b9d44f3edc340ef7260c03ea3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f318d952d54391162c511761b6705147d81493397d62b236052822a9178b9b950eb845f3ae9492b1fcdb416e7e1356e6dc1a648c69da974e87b4301e9675030
|
7
|
+
data.tar.gz: ebed34cc77dcdf05f75a4aebf8d345e77a75cb2a7e7f1afeab0a2fc0a7172bceea1ddec5fbb15e492835d92b16564093826757d330fea19270d90a2a501c1598
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -4,23 +4,16 @@ language: ruby
|
|
4
4
|
|
5
5
|
# Specify which ruby versions you wish to run your tests on, each version will be used
|
6
6
|
rvm:
|
7
|
-
- 1.8.7
|
8
|
-
- 1.9.2
|
9
7
|
- 1.9.3
|
10
8
|
- 2.0.0
|
11
9
|
- 2.1
|
12
|
-
- 2.2.1
|
13
|
-
- 2.2.2
|
14
10
|
- 2.2
|
15
|
-
-
|
16
|
-
-
|
17
|
-
- jruby
|
18
|
-
- jruby-19mode
|
11
|
+
- 2.3.3
|
12
|
+
- 2.4.1
|
13
|
+
- jruby
|
19
14
|
- ruby-head
|
20
15
|
matrix:
|
21
16
|
allow_failures:
|
22
|
-
- rvm: rbx-2
|
23
17
|
- rvm: ruby-head
|
24
18
|
script: "bundle exec rake"
|
25
|
-
|
26
19
|
sudo: false
|
data/{CHANGES → CHANGES.md}
RENAMED
@@ -1,94 +1,153 @@
|
|
1
|
-
|
1
|
+
# Changes
|
2
|
+
|
3
|
+
## 2017-04-18 (2.1.0)
|
4
|
+
* Allow passing of `decimal_class` option to specify a class as which to parse
|
5
|
+
JSON float numbers.
|
6
|
+
## 2017-03-23 (2.0.4)
|
7
|
+
* Raise exception for incomplete unicode surrogates/character escape
|
8
|
+
sequences. This problem was reported by Daniel Gollahon (dgollahon).
|
9
|
+
* Fix arbitrary heap exposure problem. This problem was reported by Ahmad
|
10
|
+
Sherif (ahmadsherif).
|
11
|
+
|
12
|
+
## 2017-01-12 (2.0.3)
|
13
|
+
* Set `required_ruby_version` to 1.9
|
14
|
+
* Some small fixes
|
15
|
+
|
16
|
+
## 2016-07-26 (2.0.2)
|
17
|
+
* Specify `required_ruby_version` for json\_pure.
|
18
|
+
* Fix issue #295 failure when parsing frozen strings.
|
19
|
+
|
20
|
+
## 2016-07-01 (2.0.1)
|
21
|
+
* Fix problem when requiring json\_pure and Parser constant was defined top
|
22
|
+
level.
|
23
|
+
* Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
|
24
|
+
* Store `current_nesting` on stack by Aaron Patterson.
|
25
|
+
|
26
|
+
## 2015-09-11 (2.0.0)
|
27
|
+
* Now complies to newest JSON RFC 7159.
|
28
|
+
* Implements compatibiliy to ruby 2.4 integer unification.
|
29
|
+
* Drops support for old rubies whose life has ended, that is rubies < 2.0.
|
30
|
+
Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
|
31
|
+
* There were still some mentions of dual GPL licensing in the source, but JSON
|
32
|
+
has just the Ruby license that itself includes an explicit dual-licensing
|
33
|
+
clause that allows covered software to be distributed under the terms of
|
34
|
+
the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
|
35
|
+
however a GPL compatible license according to the Free Software Foundation.
|
36
|
+
I changed these mentions to be consistent with the Ruby license setting in
|
37
|
+
the gemspec files which were already correct now.
|
38
|
+
|
39
|
+
## 2015-06-01 (1.8.3)
|
2
40
|
* Fix potential memory leak, thx to nobu.
|
3
|
-
|
41
|
+
|
42
|
+
## 2015-01-08 (1.8.2)
|
4
43
|
* Some performance improvements by Vipul A M <vipulnsward@gmail.com>.
|
5
44
|
* Fix by Jason R. Clark <jclark@newrelic.com> to avoid mutation of
|
6
|
-
JSON.dump_default_options
|
45
|
+
`JSON.dump_default_options`.
|
7
46
|
* More tests by Michael Mac-Vicar <mmacvicar@gmail.com> and fixing
|
8
|
-
space_before accessor in generator.
|
9
|
-
* Performance on Jruby
|
47
|
+
`space_before` accessor in generator.
|
48
|
+
* Performance on Jruby improved by Ben Browning <bbrownin@redhat.com>.
|
10
49
|
* Some fixes to be compatible with the new Ruby 2.2 by Zachary Scott <e@zzak.io>
|
11
50
|
and SHIBATA Hiroshi <hsbt@ruby-lang.org>.
|
12
|
-
|
51
|
+
|
52
|
+
## 2013-05-13 (1.8.1)
|
13
53
|
* Remove Rubinius exception since transcoding should be working now.
|
14
|
-
|
54
|
+
|
55
|
+
## 2013-05-13 (1.8.0)
|
15
56
|
* Fix https://github.com/flori/json/issues/162 reported by Marc-Andre
|
16
57
|
Lafortune <github_rocks@marc-andre.ca>. Thanks!
|
17
58
|
* Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with
|
18
59
|
-Wchar-subscripts and better validate UTF-8 strings.
|
19
60
|
* Applied patch by ginriki@github to remove unnecessary if.
|
20
|
-
* Add load/dump interface to JSON::GenericObject to make
|
21
|
-
serialize :some_attribute, JSON::GenericObject
|
22
|
-
work in Rails active models for convenient SomeModel#some_attribute.foo.bar
|
61
|
+
* Add load/dump interface to `JSON::GenericObject` to make
|
62
|
+
serialize :some_attribute, `JSON::GenericObject`
|
63
|
+
work in Rails active models for convenient `SomeModel#some_attribute.foo.bar`
|
23
64
|
access to serialised JSON data.
|
24
|
-
|
65
|
+
|
66
|
+
## 2013-02-04 (1.7.7)
|
25
67
|
* Security fix for JSON create_additions default value and
|
26
|
-
JSON::GenericObject
|
68
|
+
`JSON::GenericObject`. It should not be possible to create additions unless
|
27
69
|
explicitely requested by setting the create_additions argument to true or
|
28
|
-
using the JSON.load/dump interface. If JSON::GenericObject is supposed to
|
70
|
+
using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
|
29
71
|
be automatically deserialised, this has to be explicitely enabled by
|
30
72
|
setting
|
31
|
-
|
73
|
+
JSON::GenericObject.json_creatable = true
|
32
74
|
as well.
|
33
75
|
* Remove useless assert in fbuffer implementation.
|
34
76
|
* Apply patch attached to https://github.com/flori/json/issues#issue/155
|
35
77
|
provided by John Shahid <jvshahid@gmail.com>, Thx!
|
36
78
|
* Add license information to rubygems spec data, reported by Jordi Massaguer Pla <jmassaguerpla@suse.de>.
|
37
79
|
* Improve documentation, thx to Zachary Scott <zachary@zacharyscott.net>.
|
38
|
-
|
39
|
-
|
80
|
+
|
81
|
+
## 2012-11-29 (1.7.6)
|
82
|
+
* Add `GeneratorState#merge` alias for JRuby, fix state accessor methods. Thx to
|
40
83
|
jvshahid@github.
|
41
84
|
* Increase hash likeness of state objects.
|
42
|
-
|
85
|
+
|
86
|
+
## 2012-08-17 (1.7.5)
|
43
87
|
* Fix compilation of extension on older rubies.
|
44
|
-
|
88
|
+
|
89
|
+
## 2012-07-26 (1.7.4)
|
45
90
|
* Fix compilation problem on AIX, see https://github.com/flori/json/issues/142
|
46
|
-
|
91
|
+
|
92
|
+
## 2012-05-12 (1.7.3)
|
47
93
|
* Work around Rubinius encoding issues using iconv for conversion instead.
|
48
|
-
|
94
|
+
|
95
|
+
## 2012-05-11 (1.7.2)
|
49
96
|
* Fix some encoding issues, that cause problems for the pure and the
|
50
97
|
extension variant in jruby 1.9 mode.
|
51
|
-
|
98
|
+
|
99
|
+
## 2012-04-28 (1.7.1)
|
52
100
|
* Some small fixes for building
|
53
|
-
|
54
|
-
|
55
|
-
|
101
|
+
|
102
|
+
## 2012-04-28 (1.7.0)
|
103
|
+
* Add `JSON::GenericObject` for method access to objects transmitted via JSON.
|
104
|
+
|
105
|
+
## 2012-04-27 (1.6.7)
|
56
106
|
* Fix possible crash when trying to parse nil value.
|
57
|
-
|
107
|
+
|
108
|
+
## 2012-02-11 (1.6.6)
|
58
109
|
* Propagate src encoding to values made from it (fixes 1.9 mode converting
|
59
110
|
everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo
|
60
111
|
<tom.enebo@gmail.com>), should fix
|
61
112
|
https://github.com/flori/json/issues#issue/119.
|
62
113
|
* Fix https://github.com/flori/json/issues#issue/124 Thx to Jason Hutchens.
|
63
114
|
* Fix https://github.com/flori/json/issues#issue/117
|
64
|
-
|
115
|
+
|
116
|
+
## 2012-01-15 (1.6.5)
|
65
117
|
* Vit Ondruch <v.ondruch@tiscali.cz> reported a bug that shows up when using
|
66
118
|
optimisation under GCC 4.7. Thx to him, Bohuslav Kabrda
|
67
119
|
<bkabrda@redhat.com> and Yui NARUSE <naruse@airemix.jp> for debugging and
|
68
120
|
developing a patch fix.
|
69
|
-
|
121
|
+
|
122
|
+
## 2011-12-24 (1.6.4)
|
70
123
|
* Patches that improve speed on JRuby contributed by Charles Oliver Nutter
|
71
124
|
<headius@headius.com>.
|
72
|
-
* Support object_class
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
125
|
+
* Support `object_class`/`array_class` with duck typed hash/array.
|
126
|
+
|
127
|
+
## 2011-12-01 (1.6.3)
|
128
|
+
* Let `JSON.load('')` return nil as well to make mysql text columns (default to
|
129
|
+
`''`) work better for serialization.
|
130
|
+
|
131
|
+
## 2011-11-21 (1.6.2)
|
77
132
|
* Add support for OpenStruct and BigDecimal.
|
78
|
-
* Fix bug when parsing nil in quirks_mode
|
133
|
+
* Fix bug when parsing nil in `quirks_mode`.
|
79
134
|
* Make JSON.dump and JSON.load methods better cooperate with Rails' serialize
|
80
|
-
method. Just use:
|
135
|
+
method. Just use:
|
136
|
+
serialize :value, JSON
|
81
137
|
* Fix bug with time serialization concerning nanoseconds. Thanks for the
|
82
138
|
patch go to Josh Partlow (jpartlow@github).
|
83
139
|
* Improve parsing speed for JSON numbers (integers and floats) in a similar way to
|
84
140
|
what Evan Phoenix <evan@phx.io> suggested in:
|
85
141
|
https://github.com/flori/json/pull/103
|
86
|
-
|
142
|
+
|
143
|
+
## 2011-09-18 (1.6.1)
|
87
144
|
* Using -target 1.5 to force Java bits to compile with 1.5.
|
88
|
-
|
145
|
+
|
146
|
+
## 2011-09-12 (1.6.0)
|
89
147
|
* Extract utilities (prettifier and GUI-editor) in its own gem json-utils.
|
90
148
|
* Split json/add/core into different files for classes to be serialised.
|
91
|
-
|
149
|
+
|
150
|
+
## 2011-08-31 (1.5.4)
|
92
151
|
* Fix memory leak when used from multiple JRuby. (Patch by
|
93
152
|
jfirebaugh@github).
|
94
153
|
* Apply patch by Eric Wong <nocode@yhbt.net> that fixes garbage collection problem
|
@@ -96,42 +155,50 @@
|
|
96
155
|
* Add :quirks_mode option to parser and generator.
|
97
156
|
* Add support for Rational and Complex number additions via json/add/complex
|
98
157
|
and json/add/rational requires.
|
99
|
-
|
158
|
+
|
159
|
+
## 2011-06-20 (1.5.3)
|
100
160
|
* Alias State#configure method as State#merge to increase duck type synonymy with Hash.
|
101
|
-
* Add as_json methods in json/add/core, so rails can create its json objects
|
161
|
+
* Add `as_json` methods in json/add/core, so rails can create its json objects
|
102
162
|
the new way.
|
103
|
-
|
163
|
+
|
164
|
+
## 2011-05-11 (1.5.2)
|
104
165
|
* Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
|
105
|
-
* Add gemspecs for json and
|
166
|
+
* Add gemspecs for json and json\_pure.
|
106
167
|
* Fix bug in jruby pretty printing.
|
107
|
-
* Fix bug in object_class and array_class when inheriting from Hash or
|
108
|
-
|
168
|
+
* Fix bug in `object_class` and `array_class` when inheriting from Hash or
|
169
|
+
Array.
|
170
|
+
|
171
|
+
## 2011-01-24 (1.5.1)
|
109
172
|
* Made rake-compiler build a fat binary gem. This should fix issue
|
110
173
|
https://github.com/flori/json/issues#issue/54.
|
111
|
-
|
174
|
+
|
175
|
+
## 2011-01-22 (1.5.0)
|
112
176
|
* Included Java source codes for the Jruby extension made by Daniel Luz
|
113
177
|
<dev@mernen.com>.
|
114
|
-
* Output full exception message of deep_const_get to aid debugging.
|
115
|
-
* Fixed an issue with ruby 1.9 Module#const_defined
|
178
|
+
* Output full exception message of `deep_const_get` to aid debugging.
|
179
|
+
* Fixed an issue with ruby 1.9 `Module#const_defined?` method, that was
|
116
180
|
reported by Riley Goodside.
|
117
|
-
|
181
|
+
|
182
|
+
## 2010-08-09 (1.4.6)
|
118
183
|
* Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23,
|
119
184
|
always create a new object from the state prototype.
|
120
185
|
* Made pure and ext api more similar again.
|
121
|
-
|
186
|
+
|
187
|
+
## 2010-08-07 (1.4.5)
|
122
188
|
* Manage data structure nesting depth in state object during generation. This
|
123
|
-
should reduce problems with to_json method definіtions that only have one
|
189
|
+
should reduce problems with `to_json` method definіtions that only have one
|
124
190
|
argument.
|
125
191
|
* Some fixes in the state objects and additional tests.
|
126
|
-
2010-08-06 (1.4.4)
|
192
|
+
## 2010-08-06 (1.4.4)
|
127
193
|
* Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25
|
128
194
|
* Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and
|
129
195
|
http://github.com/flori/json/issues/closed#issue/23
|
130
|
-
2010-05-05 (1.4.3)
|
196
|
+
## 2010-05-05 (1.4.3)
|
131
197
|
* Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
|
132
198
|
* Fixed issue http://github.com/flori/json/issues/#issue/20 reported by
|
133
199
|
electronicwhisper@github. Thx!
|
134
|
-
|
200
|
+
|
201
|
+
## 2010-04-26 (1.4.2)
|
135
202
|
* Applied patch from naruse Yui NARUSE <naruse@airemix.com> to make building with
|
136
203
|
Microsoft Visual C possible again.
|
137
204
|
* Applied patch from devrandom <c1.github@niftybox.net> in order to allow building of
|
@@ -139,34 +206,43 @@
|
|
139
206
|
* Thanks to Dustin Schneider <dustin@stocktwits.com>, who reported a memory
|
140
207
|
leak, which is fixed in this release.
|
141
208
|
* Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github.
|
142
|
-
|
209
|
+
|
210
|
+
## 2010-04-25 (1.4.1)
|
143
211
|
* Fix for a bug reported by Dan DeLeo <dan@kallistec.com>, caused by T_FIXNUM
|
144
212
|
being different on 32bit/64bit architectures.
|
145
|
-
|
213
|
+
|
214
|
+
## 2010-04-23 (1.4.0)
|
146
215
|
* Major speed improvements and building with simplified
|
147
216
|
directory/file-structure.
|
148
217
|
* Extension should at least be comapatible with MRI, YARV and Rubinius.
|
149
|
-
|
218
|
+
|
219
|
+
## 2010-04-07 (1.2.4)
|
150
220
|
* Triger const_missing callback to make Rails' dynamic class loading work.
|
151
|
-
|
152
|
-
|
221
|
+
|
222
|
+
## 2010-03-11 (1.2.3)
|
223
|
+
* Added a `State#[]` method which returns an attribute's value in order to
|
153
224
|
increase duck type compatibility to Hash.
|
154
|
-
|
225
|
+
|
226
|
+
## 2010-02-27 (1.2.2)
|
155
227
|
* Made some changes to make the building of the parser/generator compatible
|
156
228
|
to Rubinius.
|
157
|
-
|
158
|
-
|
229
|
+
|
230
|
+
## 2009-11-25 (1.2.1)
|
231
|
+
* Added `:symbolize_names` option to Parser, which returns symbols instead of
|
159
232
|
strings in object names/keys.
|
160
|
-
|
161
|
-
|
233
|
+
|
234
|
+
## 2009-10-01 (1.2.0)
|
235
|
+
* `fast_generate` now raises an exeception for nan and infinite floats.
|
162
236
|
* On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
|
163
237
|
and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
|
164
238
|
functions are used to convert from all supported encodings. ASCII-8BIT
|
165
239
|
encoded strings are handled like all strings under Ruby 1.8 were.
|
166
240
|
* Better documentation
|
167
|
-
|
168
|
-
|
169
|
-
|
241
|
+
|
242
|
+
## 2009-08-23 (1.1.9)
|
243
|
+
* Added forgotten main doc file `extra_rdoc_files`.
|
244
|
+
|
245
|
+
## 2009-08-23 (1.1.8)
|
170
246
|
* Applied a patch by OZAWA Sakuro <sakuro@2238club.org> to make json/pure
|
171
247
|
work in environments that don't provide iconv.
|
172
248
|
* Applied patch by okkez_ in order to fix Ruby Bug #1768:
|
@@ -174,7 +250,8 @@
|
|
174
250
|
* Finally got around to avoid the rather paranoid escaping of ?/ characters
|
175
251
|
in the generator's output. The parsers aren't affected by this change.
|
176
252
|
Thanks to Rich Apodaca <rapodaca@metamolecular.com> for the suggestion.
|
177
|
-
|
253
|
+
|
254
|
+
## 2009-06-29 (1.1.7)
|
178
255
|
* Security Fix for JSON::Pure::Parser. A specially designed string could
|
179
256
|
cause catastrophic backtracking in one of the parser's regular expressions
|
180
257
|
in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
|
@@ -182,16 +259,19 @@
|
|
182
259
|
problem.
|
183
260
|
* This release also uses a less strict ruby version requirement for the
|
184
261
|
creation of the mswin32 native gem.
|
185
|
-
|
262
|
+
|
263
|
+
## 2009-05-10 (1.1.6)
|
186
264
|
* No changes. І tested native linux gems in the last release and they don't
|
187
265
|
play well with different ruby versions other than the one the gem was built
|
188
266
|
with. This release is just to bump the version number in order to skip the
|
189
267
|
native gem on rubyforge.
|
190
|
-
|
268
|
+
|
269
|
+
## 2009-05-10 (1.1.5)
|
191
270
|
* Started to build gems with rake-compiler gem.
|
192
271
|
* Applied patch object/array class patch from Brian Candler
|
193
272
|
<B.Candler@pobox.com> and fixes.
|
194
|
-
|
273
|
+
|
274
|
+
## 2009-04-01 (1.1.4)
|
195
275
|
* Fixed a bug in the creation of serialized generic rails objects reported by
|
196
276
|
Friedrich Graeter <graeter@hydrixos.org>.
|
197
277
|
* Deleted tests/runner.rb, we're using testrb instead.
|
@@ -200,7 +280,8 @@
|
|
200
280
|
1.9.
|
201
281
|
* Improved speed of the code path for the fast_generate method in the pure
|
202
282
|
variant.
|
203
|
-
|
283
|
+
|
284
|
+
## 2008-07-10 (1.1.3)
|
204
285
|
* Wesley Beary <monki@geemus.com> reported a bug in json/add/core's DateTime
|
205
286
|
handling: If the nominator and denominator of the offset were divisible by
|
206
287
|
each other Ruby's Rational#to_s returns them as an integer not a fraction
|
@@ -210,7 +291,8 @@
|
|
210
291
|
* Supports ragel >= 6.0 now.
|
211
292
|
* Corrected some tests.
|
212
293
|
* Some minor changes.
|
213
|
-
|
294
|
+
|
295
|
+
## 2007-11-27 (1.1.2)
|
214
296
|
* Remember default dir (last used directory) in editor.
|
215
297
|
* JSON::Editor.edit method added, the editor can now receive json texts from
|
216
298
|
the clipboard via C-v.
|
@@ -226,13 +308,14 @@
|
|
226
308
|
generator by returning something other than a String instance from a
|
227
309
|
to_json method. I now guard against this by doing a rather crude type
|
228
310
|
check, which raises an exception instead of crashing.
|
229
|
-
|
311
|
+
|
312
|
+
## 2007-07-06 (1.1.1)
|
230
313
|
* Yui NARUSE <naruse@airemix.com> sent some patches to fix tests for Ruby
|
231
314
|
1.9. I applied them and adapted some of them a bit to run both on 1.8 and
|
232
315
|
1.9.
|
233
|
-
* Introduced a JSON.parse
|
234
|
-
danger.
|
235
|
-
* Made generate and pretty_generate methods configurable by an options hash.
|
316
|
+
* Introduced a `JSON.parse!` method without depth checking for people who
|
317
|
+
like danger.
|
318
|
+
* Made generate and `pretty_generate` methods configurable by an options hash.
|
236
319
|
* Added :allow_nan option to parser and generator in order to handle NaN,
|
237
320
|
Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers,
|
238
321
|
aren't valid JSON according to RFC4627, so by default an exception will be
|
@@ -241,55 +324,65 @@
|
|
241
324
|
* Fixed some more tests for Ruby 1.9.
|
242
325
|
* Implemented dump/load interface of Marshal as suggested in ruby-core:11405
|
243
326
|
by murphy <murphy@rubychan.de>.
|
244
|
-
* Implemented the max_nesting feature for generate methods, too.
|
327
|
+
* Implemented the `max_nesting` feature for generate methods, too.
|
245
328
|
* Added some implementations for ruby core's custom objects for
|
246
329
|
serialisation/deserialisation purposes.
|
247
|
-
|
330
|
+
|
331
|
+
## 2007-05-21 (1.1.0)
|
248
332
|
* Implemented max_nesting feature for parser to avoid stack overflows for
|
249
333
|
data from untrusted sources. If you trust the source, you can disable it
|
250
334
|
with the option max_nesting => false.
|
251
335
|
* Piers Cawley <pdcawley@bofh.org.uk> reported a bug, that not every
|
252
|
-
character can be escaped by
|
336
|
+
character can be escaped by `\` as required by RFC4627. There's a
|
253
337
|
contradiction between David Crockford's JSON checker test vectors (in
|
254
338
|
tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
|
255
339
|
the JSON checker seems to be a bit older than the RFC.
|
256
340
|
* Extended license to Ruby License, which includes the GPL.
|
257
341
|
* Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb.
|
258
|
-
|
342
|
+
|
343
|
+
## 2007-05-09 (1.0.4)
|
259
344
|
* Applied a patch from Yui NARUSE <naruse@airemix.com> to make JSON compile
|
260
345
|
under Ruby 1.9. Thank you very much for mailing it to me!
|
261
346
|
* Made binary variants of JSON fail early, instead of falling back to the
|
262
347
|
pure version. This should avoid overshadowing of eventual problems while
|
263
348
|
loading of the binary.
|
264
|
-
|
349
|
+
|
350
|
+
## 2007-03-24 (1.0.3)
|
265
351
|
* Improved performance of pure variant a bit.
|
266
352
|
* The ext variant of this release supports the mswin32 platform. Ugh!
|
267
|
-
|
353
|
+
|
354
|
+
## 2007-03-24 (1.0.2)
|
268
355
|
* Ext Parser didn't parse 0e0 correctly into 0.0: Fixed!
|
269
|
-
|
356
|
+
|
357
|
+
## 2007-03-24 (1.0.1)
|
270
358
|
* Forgot some object files in the build dir. I really like that - not!
|
271
|
-
|
359
|
+
|
360
|
+
## 2007-03-24 (1.0.0)
|
272
361
|
* Added C implementations for the JSON generator and a ragel based JSON
|
273
362
|
parser in C.
|
274
363
|
* Much more tests, especially fixtures from json.org.
|
275
364
|
* Further improved conformance to RFC4627.
|
276
|
-
|
365
|
+
|
366
|
+
## 2007-02-09 (0.4.3)
|
277
367
|
* Conform more to RFC4627 for JSON: This means JSON strings
|
278
|
-
now always must contain exactly one object "{ ... }" or array "[ ... ]" in
|
368
|
+
now always must contain exactly one object `"{ ... }"` or array `"[ ... ]"` in
|
279
369
|
order to be parsed without raising an exception. The definition of what
|
280
370
|
constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
|
281
371
|
there are differences in floats and integers (no octals or hexadecimals) as
|
282
372
|
well.
|
283
|
-
* Added aliases generate and pretty_generate of unparse and pretty_unparse
|
373
|
+
* Added aliases generate and `pretty_generate` of unparse and `pretty_unparse`.
|
284
374
|
* Fixed a test case.
|
285
|
-
* Catch an Iconv::InvalidEncoding exception, that seems to occur on some Sun
|
375
|
+
* Catch an `Iconv::InvalidEncoding` exception, that seems to occur on some Sun
|
286
376
|
boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
|
287
377
|
reported by Andrew R Jackson <andrewj@bcm.tmc.edu>, thanks a bunch!
|
288
|
-
|
378
|
+
|
379
|
+
## 2006-08-25 (0.4.2)
|
289
380
|
* Fixed a bug in handling solidi (/-characters), that was reported by
|
290
381
|
Kevin Gilpin <kevin.gilpin@alum.mit.edu>.
|
291
|
-
|
382
|
+
|
383
|
+
## 2006-02-06 (0.4.1)
|
292
384
|
* Fixed a bug related to escaping with backslashes. Thanks for the report go
|
293
385
|
to Florian Munz <surf@theflow.de>.
|
294
|
-
|
386
|
+
|
387
|
+
## 2005-09-23 (0.4.0)
|
295
388
|
* Initial Rubyforge Version
|
data/Gemfile
CHANGED
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
case ENV['JSON']
|
6
|
+
when 'ext', nil
|
7
|
+
if ENV['RUBY_ENGINE'] == 'jruby'
|
8
|
+
gemspec :name => 'json-java'
|
9
|
+
else
|
10
|
+
gemspec :name => 'json'
|
11
|
+
end
|
12
|
+
when 'pure'
|
13
|
+
gemspec :name => 'json_pure'
|
14
|
+
end
|
8
15
|
|
9
|
-
gem '
|
10
|
-
gem 'test-unit'
|
16
|
+
gem 'simplecov'
|
File without changes
|