json 1.8.6 → 2.3.0

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