json 1.8.6 → 2.3.1

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