json 1.8.6-java → 2.11.1-java

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.
Files changed (74) hide show
  1. checksums.yaml +5 -5
  2. data/BSDL +22 -0
  3. data/CHANGES.md +619 -0
  4. data/COPYING +56 -0
  5. data/LEGAL +8 -0
  6. data/README.md +268 -0
  7. data/json.gemspec +63 -0
  8. data/lib/json/add/bigdecimal.rb +41 -11
  9. data/lib/json/add/complex.rb +32 -9
  10. data/lib/json/add/core.rb +1 -0
  11. data/lib/json/add/date.rb +27 -7
  12. data/lib/json/add/date_time.rb +26 -9
  13. data/lib/json/add/exception.rb +25 -7
  14. data/lib/json/add/ostruct.rb +32 -9
  15. data/lib/json/add/range.rb +33 -8
  16. data/lib/json/add/rational.rb +30 -8
  17. data/lib/json/add/regexp.rb +28 -10
  18. data/lib/json/add/set.rb +48 -0
  19. data/lib/json/add/struct.rb +29 -7
  20. data/lib/json/add/symbol.rb +34 -7
  21. data/lib/json/add/time.rb +29 -15
  22. data/lib/json/common.rb +916 -316
  23. data/lib/json/ext/generator/state.rb +106 -0
  24. data/lib/json/ext/generator.jar +0 -0
  25. data/lib/json/ext/parser.jar +0 -0
  26. data/lib/json/ext.rb +34 -10
  27. data/lib/json/generic_object.rb +11 -6
  28. data/lib/json/truffle_ruby/generator.rb +690 -0
  29. data/lib/json/version.rb +3 -6
  30. data/lib/json.rb +560 -35
  31. metadata +29 -82
  32. data/lib/json/pure/generator.rb +0 -530
  33. data/lib/json/pure/parser.rb +0 -359
  34. data/lib/json/pure.rb +0 -21
  35. data/tests/fixtures/fail1.json +0 -1
  36. data/tests/fixtures/fail10.json +0 -1
  37. data/tests/fixtures/fail11.json +0 -1
  38. data/tests/fixtures/fail12.json +0 -1
  39. data/tests/fixtures/fail13.json +0 -1
  40. data/tests/fixtures/fail14.json +0 -1
  41. data/tests/fixtures/fail18.json +0 -1
  42. data/tests/fixtures/fail19.json +0 -1
  43. data/tests/fixtures/fail2.json +0 -1
  44. data/tests/fixtures/fail20.json +0 -1
  45. data/tests/fixtures/fail21.json +0 -1
  46. data/tests/fixtures/fail22.json +0 -1
  47. data/tests/fixtures/fail23.json +0 -1
  48. data/tests/fixtures/fail24.json +0 -1
  49. data/tests/fixtures/fail25.json +0 -1
  50. data/tests/fixtures/fail27.json +0 -2
  51. data/tests/fixtures/fail28.json +0 -2
  52. data/tests/fixtures/fail3.json +0 -1
  53. data/tests/fixtures/fail4.json +0 -1
  54. data/tests/fixtures/fail5.json +0 -1
  55. data/tests/fixtures/fail6.json +0 -1
  56. data/tests/fixtures/fail7.json +0 -1
  57. data/tests/fixtures/fail8.json +0 -1
  58. data/tests/fixtures/fail9.json +0 -1
  59. data/tests/fixtures/pass1.json +0 -56
  60. data/tests/fixtures/pass15.json +0 -1
  61. data/tests/fixtures/pass16.json +0 -1
  62. data/tests/fixtures/pass17.json +0 -1
  63. data/tests/fixtures/pass2.json +0 -1
  64. data/tests/fixtures/pass26.json +0 -1
  65. data/tests/fixtures/pass3.json +0 -6
  66. data/tests/setup_variant.rb +0 -11
  67. data/tests/test_json.rb +0 -519
  68. data/tests/test_json_addition.rb +0 -196
  69. data/tests/test_json_encoding.rb +0 -65
  70. data/tests/test_json_fixtures.rb +0 -35
  71. data/tests/test_json_generate.rb +0 -348
  72. data/tests/test_json_generic_object.rb +0 -75
  73. data/tests/test_json_string_matching.rb +0 -39
  74. data/tests/test_json_unicode.rb +0 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fe863494e61337b8770fbb9486e300233d9aa8cf
4
- data.tar.gz: 018ea087e719124514fcf421a551bf61e39e9f2e
2
+ SHA256:
3
+ metadata.gz: b09e8ff0151f4a70f6400293c68aee23c7b5b3e2ca8fa042f755ca2b3346fc59
4
+ data.tar.gz: 59c24f5f8de7c032c1d101ff1e80d09b84bb419e155f93a74e158a0e0fc8cac9
5
5
  SHA512:
6
- metadata.gz: 023b2e5a21f216f8cf4b937f6af390849cf846b41c8be00219f4dfc632afab44a6a236c4700842a2bfba4a5a4e54f288ef5dc1dedf4b8a162a2f141d469dc5d1
7
- data.tar.gz: 593fd8435eddda63f89053d8bf4b1f30e8ccf510ca21b1492eeb7e3d6a569d4cd7dd987b6ce97ae5e2c131dd9fafc3e1366ce8ddb722d493c7802dfe81186c7d
6
+ metadata.gz: 8fe3a381366f4f9494431a4730782fc19124c62aed5b4090ee43fa28c90f26674abbdd86d5a22f61e211bc0a2eabaf607725c060332c42f7c09e32eb66a38770
7
+ data.tar.gz: '0807e1eeaf0069d25b9382e2553b52f018183ddc6acee40c90da1e181bfc59eab6fceae20abe56d3d395ae53edc9be83bb0daa0bf52f5b456bee504acc9f451b'
data/BSDL ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
+ SUCH DAMAGE.
data/CHANGES.md ADDED
@@ -0,0 +1,619 @@
1
+ # Changes
2
+
3
+ ### 2025-04-24 (2.11.1)
4
+
5
+ * Add back `JSON.restore`, `JSON.unparse`, `JSON.fast_unparse` and `JSON.pretty_unparse`.
6
+ These were deprecated 16 years ago, but never emited warnings, only undocumented, so are
7
+ still used by a few gems.
8
+
9
+ ### 2025-04-24 (2.11.0)
10
+
11
+ * Optimize Integer generation to be ~1.8x faster.
12
+ * Optimize Float generation to be ~10x faster.
13
+ * Fix `JSON.load` proc argument to substitute the parsed object with the return value.
14
+ This better match `Marshal.load` behavior.
15
+ * Deprecate `JSON.fast_generate` (it's not any faster, so pointless).
16
+ * Deprecate `JSON.load_default_options`.
17
+ * Deprecate `JSON.unsafe_load_default_options`.
18
+ * Deprecate `JSON.dump_default_options`.
19
+ * Deprecate `Kernel#j`
20
+ * Deprecate `Kernel#jj`
21
+ * Remove outdated `JSON.iconv`.
22
+ * Remove `Class#json_creatable?` monkey patch.
23
+ * Remove deprecated `JSON.restore` method.
24
+ * Remove deprecated `JSON.unparse` method.
25
+ * Remove deprecated `JSON.fast_unparse` method.
26
+ * Remove deprecated `JSON.pretty_unparse` method.
27
+ * Remove deprecated `JSON::UnparserError` constant.
28
+ * Remove outdated `JSON::MissingUnicodeSupport` constant.
29
+
30
+ ### 2025-03-12 (2.10.2)
31
+
32
+ * Fix a potential crash in the C extension parser.
33
+ * Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until `2.10.0` unadvertently changed it.
34
+ * Ensure document snippets that are included in parser errors don't include truncated multibyte characters.
35
+ * Ensure parser error snippets are valid UTF-8.
36
+ * Fix `JSON::GeneratorError#detailed_message` on Ruby < 3.2
37
+
38
+ ### 2025-02-10 (2.10.1)
39
+
40
+ * Fix a compatibility issue with `MultiJson.dump(obj, pretty: true)`: `no implicit conversion of false into Proc (TypeError)`.
41
+
42
+ ### 2025-02-10 (2.10.0)
43
+
44
+ * `strict: true` now accept symbols as values. Previously they'd only be accepted as hash keys.
45
+ * The C extension Parser has been entirely reimplemented from scratch.
46
+ * Introduced `JSON::Coder` as a new API allowing to customize how non native types are serialized in a non-global way.
47
+ * Introduced `JSON::Fragment` to allow assembling cached fragments in a safe way.
48
+ * The Java implementation of the generator received many optimizations.
49
+
50
+ ### 2024-12-18 (2.9.1)
51
+
52
+ * Fix support for Solaris 10.
53
+
54
+ ### 2024-12-03 (2.9.0)
55
+
56
+ * Fix C implementation of `script_safe` escaping to not confuse some other 3 wide characters with `\u2028` and `\u2029`.
57
+ e.g. `JSON.generate(["倩", "瀨"], script_safe: true)` would generate the wrong JSON.
58
+ * `JSON.dump(object, some_io)` now write into the IO in chunks while previously it would buffer the entire JSON before writing.
59
+ * `JSON::GeneratorError` now has a `#invalid_object` attribute, making it easier to understand why an object tree cannot be serialized.
60
+ * Numerous improvements to the JRuby extension.
61
+
62
+ ### 2024-11-14 (2.8.2)
63
+
64
+ * `JSON.load_file` explictly read the file as UTF-8.
65
+
66
+ ### 2024-11-06 (2.8.1)
67
+
68
+ * Fix the java packages to include the extension.
69
+
70
+ ### 2024-11-06 (2.8.0)
71
+
72
+ * Emit a deprecation warning when `JSON.load` create custom types without the `create_additions` option being explictly enabled.
73
+ * Prefer to use `JSON.unsafe_load(string)` or `JSON.load(string, create_additions: true)`.
74
+ * Emit a deprecation warning when serializing valid UTF-8 strings encoded in `ASCII_8BIT` aka `BINARY`.
75
+ * Bump required Ruby version to 2.7.
76
+ * Add support for optionally parsing trailing commas, via `allow_trailing_comma: true`, which in cunjunction with the
77
+ pre-existing support for comments, make it suitable to parse `jsonc` documents.
78
+ * Many performance improvements to `JSON.parse` and `JSON.load`, up to `1.7x` faster on real world documents.
79
+ * Some minor performance improvements to `JSON.dump` and `JSON.generate`.
80
+ * `JSON.pretty_generate` no longer include newline inside empty object and arrays.
81
+
82
+ ### 2024-11-04 (2.7.6)
83
+
84
+ * Fix a regression in JSON.generate when dealing with Hash keys that are string subclasses, call `to_json` on them.
85
+
86
+ ### 2024-10-25 (2.7.5)
87
+
88
+ * Fix a memory leak when `#to_json` methods raise an exception.
89
+ * Gracefully handle formatting configs being set to `nil` instead of `""`.
90
+ * Workaround another issue caused by conflicting versions of both `json_pure` and `json` being loaded.
91
+
92
+ ### 2024-10-25 (2.7.4)
93
+
94
+ * Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
95
+ This bug would cause some gems with native extension to fail during compilation.
96
+ * Workaround different versions of `json` and `json_pure` being loaded (not officially supported).
97
+ * Make `json_pure` Ractor compatible.
98
+
99
+ ### 2024-10-24 (2.7.3)
100
+
101
+ * Numerous performance optimizations in `JSON.generate` and `JSON.dump` (up to 2 times faster).
102
+ * Limit the size of ParserError exception messages, only include up to 32 bytes of the unparseable source.
103
+ * Fix json-pure's `Object#to_json` to accept non state arguments
104
+ * Fix multiline comment support in `json-pure`.
105
+ * Fix `JSON.parse` to no longer mutate the argument encoding when passed an ASCII-8BIT string.
106
+ * Fix `String#to_json` to raise on invalid encoding in `json-pure`.
107
+ * Delete code that was based on CVTUTF.
108
+ * Use the pure-Ruby generator on TruffleRuby.
109
+ * Fix `strict` mode in `json-pure` to not break on Integer.
110
+
111
+ ### 2024-04-04 (2.7.2)
112
+
113
+ * Use rb_sym2str instead of SYM2ID #561
114
+ * Fix memory leak when exception is raised during JSON generation #574
115
+ * Remove references to "19" methods in JRuby #576
116
+ * Make OpenStruct support as optional by @hsbt in #565
117
+ * Autoload JSON::GenericObject to avoid require ostruct warning in Ruby 3.4 #577
118
+ * Warn to install ostruct if json couldn't load it by @hsbt #578
119
+
120
+ ### 2023-12-05 (2.7.1)
121
+
122
+ * JSON.dump: handle unenclosed hashes regression #554
123
+ * Overload kwargs in JSON.dump #556
124
+ * [DOC] RDoc for additions #557
125
+ * Fix JSON.dump overload combination #558
126
+
127
+ ### 2023-12-01 (2.7.0)
128
+
129
+ * Add a strict option to Generator #519
130
+ * `escape_slash` option was renamed as `script_safe` and now also escape U+2028 and U+2029. `escape_slash` is now an alias of `script_safe` #525
131
+ * Remove unnecessary initialization of create_id in JSON.parse() #454
132
+ * Improvements to Hash#to_json in pure implementation generator #203
133
+ * Use ruby_xfree to free buffers #518
134
+ * Fix "unexpected token" offset for Infinity #507
135
+ * Avoid using deprecated BigDecimal.new on JRuby #546
136
+ * Removed code for Ruby 1.8 #540
137
+ * Rename JSON::ParseError to JSON:ParserError #530
138
+ * Call super in included hook #486
139
+ * JRuby requires a minimum of Java 8 #516
140
+ * Always indent even if empty #517
141
+
142
+ ### 2022-11-30 (2.6.3)
143
+
144
+ * bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError #483
145
+ * Stop including the parser source __LINE__ in exceptions #470
146
+
147
+ ### 2022-11-17 (2.6.2)
148
+
149
+ * Remove unknown keyword arg from DateTime.parse #488
150
+ * Ignore java artifacts by @hsbt #489
151
+ * Fix parser bug for empty string allocation #496
152
+
153
+ ### 2021-10-24 (2.6.1)
154
+
155
+ * Restore version.rb with 2.6.1
156
+
157
+ ### 2021-10-14 (2.6.0)
158
+
159
+ * Use `rb_enc_interned_str` if available to reduce allocations in `freeze: true` mode. #451.
160
+ * Bump required_ruby_version to 2.3.
161
+ * Fix compatibility with `GC.compact`.
162
+ * Fix some compilation warnings. #469
163
+
164
+ ## 2020-12-22 (2.5.1)
165
+
166
+ * Restore the compatibility for constants of JSON class.
167
+
168
+ ## 2020-12-22 (2.5.0)
169
+
170
+ * Ready to Ractor-safe at Ruby 3.0.
171
+
172
+ ## 2020-12-17 (2.4.1)
173
+
174
+ * Restore version.rb with 2.4.1
175
+
176
+ ## 2020-12-15 (2.4.0)
177
+
178
+ * Implement a freeze: parser option #447
179
+ * Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations #449
180
+ * Fix JSON.load_file doc #448
181
+ * Fix pure parser with unclosed arrays / objects #425
182
+ * bundle the LICENSE file in the gem #444
183
+ * Add an option to escape forward slash character #405
184
+ * RDoc for JSON #439 #446 #442 #434 #433 #430
185
+
186
+ ## 2020-06-30 (2.3.1)
187
+
188
+ * Spelling and grammar fixes for comments. Pull request #191 by Josh
189
+ Kline.
190
+ * Enhance generic JSON and #generate docs. Pull request #347 by Victor
191
+ Shepelev.
192
+ * Add :nodoc: for GeneratorMethods. Pull request #349 by Victor Shepelev.
193
+ * Baseline changes to help (JRuby) development. Pull request #371 by Karol
194
+ Bucek.
195
+ * Add metadata for rubygems.org. Pull request #379 by Alexandre ZANNI.
196
+ * Remove invalid JSON.generate description from JSON module rdoc. Pull
197
+ request #384 by Jeremy Evans.
198
+ * Test with TruffleRuby in CI. Pull request #402 by Benoit Daloze.
199
+ * Rdoc enhancements. Pull request #413 by Burdette Lamar.
200
+ * Fixtures/ are not being tested... Pull request #416 by Marc-André
201
+ Lafortune.
202
+ * Use frozen string for hash key. Pull request #420 by Marc-André
203
+ Lafortune.
204
+ * Added :call-seq: to RDoc for some methods. Pull request #422 by Burdette
205
+ Lamar.
206
+ * Small typo fix. Pull request #423 by Marc-André Lafortune.
207
+
208
+ ## 2019-12-11 (2.3.0)
209
+ * Fix default of `create_additions` to always be `false` for `JSON(user_input)`
210
+ and `JSON.parse(user_input, nil)`.
211
+ Note that `JSON.load` remains with default `true` and is meant for internal
212
+ serialization of trusted data. [CVE-2020-10663]
213
+ * Fix passing args all #to_json in json/add/*.
214
+ * Fix encoding issues
215
+ * Fix issues of keyword vs positional parameter
216
+ * Fix JSON::Parser against bigdecimal updates
217
+ * Bug fixes to JRuby port
218
+
219
+ ## 2019-02-21 (2.2.0)
220
+ * Adds support for 2.6 BigDecimal and ruby standard library Set datetype.
221
+
222
+ ## 2017-04-18 (2.1.0)
223
+ * Allow passing of `decimal_class` option to specify a class as which to parse
224
+ JSON float numbers.
225
+ ## 2017-03-23 (2.0.4)
226
+ * Raise exception for incomplete unicode surrogates/character escape
227
+ sequences. This problem was reported by Daniel Gollahon (dgollahon).
228
+ * Fix arbitrary heap exposure problem. This problem was reported by Ahmad
229
+ Sherif (ahmadsherif).
230
+
231
+ ## 2017-01-12 (2.0.3)
232
+ * Set `required_ruby_version` to 1.9
233
+ * Some small fixes
234
+
235
+ ## 2016-07-26 (2.0.2)
236
+ * Specify `required_ruby_version` for json\_pure.
237
+ * Fix issue #295 failure when parsing frozen strings.
238
+
239
+ ## 2016-07-01 (2.0.1)
240
+ * Fix problem when requiring json\_pure and Parser constant was defined top
241
+ level.
242
+ * Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
243
+ * Store `current_nesting` on stack by Aaron Patterson.
244
+
245
+ ## 2015-09-11 (2.0.0)
246
+ * Now complies to newest JSON RFC 7159.
247
+ * Implements compatibility to ruby 2.4 integer unification.
248
+ * Drops support for old rubies whose life has ended, that is rubies < 2.0.
249
+ Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
250
+ * There were still some mentions of dual GPL licensing in the source, but JSON
251
+ has just the Ruby license that itself includes an explicit dual-licensing
252
+ clause that allows covered software to be distributed under the terms of
253
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
254
+ however a GPL compatible license according to the Free Software Foundation.
255
+ I changed these mentions to be consistent with the Ruby license setting in
256
+ the gemspec files which were already correct now.
257
+
258
+ ## 2017-01-13 (1.8.6)
259
+ * Be compatible with ancient ruby 1.8 (maybe?)
260
+
261
+ ## 2015-09-11 (1.8.5)
262
+ * Be compatible with ruby 2.4.0
263
+ * There were still some mentions of dual GPL licensing in the source, but JSON
264
+ has just the Ruby license that itself includes an explicit dual-licensing
265
+ clause that allows covered software to be distributed under the terms of
266
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
267
+ however a GPL compatible license according to the Free Software Foundation.
268
+ I changed these mentions to be consistent with the Ruby license setting in
269
+ the gemspec files which were already correct now.
270
+
271
+ ## 2015-06-01 (1.8.3)
272
+ * Fix potential memory leak, thx to nobu.
273
+
274
+ ## 2015-01-08 (1.8.2)
275
+ * Some performance improvements by Vipul A M <vipulnsward@gmail.com>.
276
+ * Fix by Jason R. Clark <jclark@newrelic.com> to avoid mutation of
277
+ `JSON.dump_default_options`.
278
+ * More tests by Michael Mac-Vicar <mmacvicar@gmail.com> and fixing
279
+ `space_before` accessor in generator.
280
+ * Performance on Jruby improved by Ben Browning <bbrownin@redhat.com>.
281
+ * Some fixes to be compatible with the new Ruby 2.2 by Zachary Scott <e@zzak.io>
282
+ and SHIBATA Hiroshi <hsbt@ruby-lang.org>.
283
+
284
+ ## 2013-05-13 (1.8.1)
285
+ * Remove Rubinius exception since transcoding should be working now.
286
+
287
+ ## 2013-05-13 (1.8.0)
288
+ * Fix https://github.com/ruby/json/issues/162 reported by Marc-Andre
289
+ Lafortune <github_rocks@marc-andre.ca>. Thanks!
290
+ * Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with
291
+ -Wchar-subscripts and better validate UTF-8 strings.
292
+ * Applied patch by ginriki@github to remove unnecessary if.
293
+ * Add load/dump interface to `JSON::GenericObject` to make
294
+ serialize :some_attribute, `JSON::GenericObject`
295
+ work in Rails active models for convenient `SomeModel#some_attribute.foo.bar`
296
+ access to serialised JSON data.
297
+
298
+ ## 2013-02-04 (1.7.7)
299
+ * Security fix for JSON create_additions default value and
300
+ `JSON::GenericObject`. It should not be possible to create additions unless
301
+ explicitly requested by setting the create_additions argument to true or
302
+ using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
303
+ be automatically deserialised, this has to be explicitly enabled by
304
+ setting
305
+ JSON::GenericObject.json_creatable = true
306
+ as well.
307
+ * Remove useless assert in fbuffer implementation.
308
+ * Apply patch attached to https://github.com/ruby/json/issues#issue/155
309
+ provided by John Shahid <jvshahid@gmail.com>, Thx!
310
+ * Add license information to rubygems spec data, reported by Jordi Massaguer Pla <jmassaguerpla@suse.de>.
311
+ * Improve documentation, thx to Zachary Scott <zachary@zacharyscott.net>.
312
+
313
+ ## 2012-11-29 (1.7.6)
314
+ * Add `GeneratorState#merge` alias for JRuby, fix state accessor methods. Thx to
315
+ jvshahid@github.
316
+ * Increase hash likeness of state objects.
317
+
318
+ ## 2012-08-17 (1.7.5)
319
+ * Fix compilation of extension on older rubies.
320
+
321
+ ## 2012-07-26 (1.7.4)
322
+ * Fix compilation problem on AIX, see https://github.com/ruby/json/issues/142
323
+
324
+ ## 2012-05-12 (1.7.3)
325
+ * Work around Rubinius encoding issues using iconv for conversion instead.
326
+
327
+ ## 2012-05-11 (1.7.2)
328
+ * Fix some encoding issues, that cause problems for the pure and the
329
+ extension variant in jruby 1.9 mode.
330
+
331
+ ## 2012-04-28 (1.7.1)
332
+ * Some small fixes for building
333
+
334
+ ## 2012-04-28 (1.7.0)
335
+ * Add `JSON::GenericObject` for method access to objects transmitted via JSON.
336
+
337
+ ## 2012-04-27 (1.6.7)
338
+ * Fix possible crash when trying to parse nil value.
339
+
340
+ ## 2012-02-11 (1.6.6)
341
+ * Propagate src encoding to values made from it (fixes 1.9 mode converting
342
+ everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo
343
+ <tom.enebo@gmail.com>), should fix
344
+ https://github.com/ruby/json/issues#issue/119.
345
+ * Fix https://github.com/ruby/json/issues#issue/124 Thx to Jason Hutchens.
346
+ * Fix https://github.com/ruby/json/issues#issue/117
347
+
348
+ ## 2012-01-15 (1.6.5)
349
+ * Vit Ondruch <v.ondruch@tiscali.cz> reported a bug that shows up when using
350
+ optimisation under GCC 4.7. Thx to him, Bohuslav Kabrda
351
+ <bkabrda@redhat.com> and Yui NARUSE <naruse@airemix.jp> for debugging and
352
+ developing a patch fix.
353
+
354
+ ## 2011-12-24 (1.6.4)
355
+ * Patches that improve speed on JRuby contributed by Charles Oliver Nutter
356
+ <headius@headius.com>.
357
+ * Support `object_class`/`array_class` with duck typed hash/array.
358
+
359
+ ## 2011-12-01 (1.6.3)
360
+ * Let `JSON.load('')` return nil as well to make mysql text columns (default to
361
+ `''`) work better for serialization.
362
+
363
+ ## 2011-11-21 (1.6.2)
364
+ * Add support for OpenStruct and BigDecimal.
365
+ * Fix bug when parsing nil in `quirks_mode`.
366
+ * Make JSON.dump and JSON.load methods better cooperate with Rails' serialize
367
+ method. Just use:
368
+ serialize :value, JSON
369
+ * Fix bug with time serialization concerning nanoseconds. Thanks for the
370
+ patch go to Josh Partlow (jpartlow@github).
371
+ * Improve parsing speed for JSON numbers (integers and floats) in a similar way to
372
+ what Evan Phoenix <evan@phx.io> suggested in:
373
+ https://github.com/ruby/json/pull/103
374
+
375
+ ## 2011-09-18 (1.6.1)
376
+ * Using -target 1.5 to force Java bits to compile with 1.5.
377
+
378
+ ## 2011-09-12 (1.6.0)
379
+ * Extract utilities (prettifier and GUI-editor) in its own gem json-utils.
380
+ * Split json/add/core into different files for classes to be serialised.
381
+
382
+ ## 2011-08-31 (1.5.4)
383
+ * Fix memory leak when used from multiple JRuby. (Patch by
384
+ jfirebaugh@github).
385
+ * Apply patch by Eric Wong <nocode@yhbt.net> that fixes garbage collection problem
386
+ reported in https://github.com/ruby/json/issues/46.
387
+ * Add :quirks_mode option to parser and generator.
388
+ * Add support for Rational and Complex number additions via json/add/complex
389
+ and json/add/rational requires.
390
+
391
+ ## 2011-06-20 (1.5.3)
392
+ * Alias State#configure method as State#merge to increase duck type synonymy with Hash.
393
+ * Add `as_json` methods in json/add/core, so rails can create its json objects the new way.
394
+
395
+ ## 2011-05-11 (1.5.2)
396
+ * Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
397
+ * Add gemspecs for json and json\_pure.
398
+ * Fix bug in jruby pretty printing.
399
+ * Fix bug in `object_class` and `array_class` when inheriting from Hash or
400
+ Array.
401
+
402
+ ## 2011-01-24 (1.5.1)
403
+ * Made rake-compiler build a fat binary gem. This should fix issue
404
+ https://github.com/ruby/json/issues#issue/54.
405
+
406
+ ## 2011-01-22 (1.5.0)
407
+ * Included Java source codes for the Jruby extension made by Daniel Luz
408
+ <dev@mernen.com>.
409
+ * Output full exception message of `deep_const_get` to aid debugging.
410
+ * Fixed an issue with ruby 1.9 `Module#const_defined?` method, that was
411
+ reported by Riley Goodside.
412
+
413
+ ## 2010-08-09 (1.4.6)
414
+ * Fixed oversight reported in http://github.com/ruby/json/issues/closed#issue/23,
415
+ always create a new object from the state prototype.
416
+ * Made pure and ext api more similar again.
417
+
418
+ ## 2010-08-07 (1.4.5)
419
+ * Manage data structure nesting depth in state object during generation. This
420
+ should reduce problems with `to_json` method definіtions that only have one
421
+ argument.
422
+ * Some fixes in the state objects and additional tests.
423
+ ## 2010-08-06 (1.4.4)
424
+ * Fixes build problem for rubinius under OS X, http://github.com/ruby/json/issues/closed#issue/25
425
+ * Fixes crashes described in http://github.com/ruby/json/issues/closed#issue/21 and
426
+ http://github.com/ruby/json/issues/closed#issue/23
427
+ ## 2010-05-05 (1.4.3)
428
+ * Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
429
+ * Fixed issue http://github.com/ruby/json/issues/#issue/20 reported by
430
+ electronicwhisper@github. Thx!
431
+
432
+ ## 2010-04-26 (1.4.2)
433
+ * Applied patch from naruse Yui NARUSE <naruse@airemix.com> to make building with
434
+ Microsoft Visual C possible again.
435
+ * Applied patch from devrandom <c1.github@niftybox.net> in order to allow building of
436
+ json_pure if extensiontask is not present.
437
+ * Thanks to Dustin Schneider <dustin@stocktwits.com>, who reported a memory
438
+ leak, which is fixed in this release.
439
+ * Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github.
440
+
441
+ ## 2010-04-25 (1.4.1)
442
+ * Fix for a bug reported by Dan DeLeo <dan@kallistec.com>, caused by T_FIXNUM
443
+ being different on 32bit/64bit architectures.
444
+
445
+ ## 2010-04-23 (1.4.0)
446
+ * Major speed improvements and building with simplified
447
+ directory/file-structure.
448
+ * Extension should at least be compatible with MRI, YARV and Rubinius.
449
+
450
+ ## 2010-04-07 (1.2.4)
451
+ * Trigger const_missing callback to make Rails' dynamic class loading work.
452
+
453
+ ## 2010-03-11 (1.2.3)
454
+ * Added a `State#[]` method which returns an attribute's value in order to
455
+ increase duck type compatibility to Hash.
456
+
457
+ ## 2010-02-27 (1.2.2)
458
+ * Made some changes to make the building of the parser/generator compatible
459
+ to Rubinius.
460
+
461
+ ## 2009-11-25 (1.2.1)
462
+ * Added `:symbolize_names` option to Parser, which returns symbols instead of
463
+ strings in object names/keys.
464
+
465
+ ## 2009-10-01 (1.2.0)
466
+ * `fast_generate` now raises an exception for nan and infinite floats.
467
+ * On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
468
+ and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
469
+ functions are used to convert from all supported encodings. ASCII-8BIT
470
+ encoded strings are handled like all strings under Ruby 1.8 were.
471
+ * Better documentation
472
+
473
+ ## 2009-08-23 (1.1.9)
474
+ * Added forgotten main doc file `extra_rdoc_files`.
475
+
476
+ ## 2009-08-23 (1.1.8)
477
+ * Applied a patch by OZAWA Sakuro <sakuro@2238club.org> to make json/pure
478
+ work in environments that don't provide iconv.
479
+ * Applied patch by okkez_ in order to fix Ruby Bug #1768:
480
+ http://redmine.ruby-lang.org/issues/show/1768.
481
+ * Finally got around to avoid the rather paranoid escaping of ?/ characters
482
+ in the generator's output. The parsers aren't affected by this change.
483
+ Thanks to Rich Apodaca <rapodaca@metamolecular.com> for the suggestion.
484
+
485
+ ## 2009-06-29 (1.1.7)
486
+ * Security Fix for JSON::Pure::Parser. A specially designed string could
487
+ cause catastrophic backtracking in one of the parser's regular expressions
488
+ in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
489
+ Thanks to Bartosz Blimke <bartosz@new-bamboo.co.uk> for reporting this
490
+ problem.
491
+ * This release also uses a less strict ruby version requirement for the
492
+ creation of the mswin32 native gem.
493
+
494
+ ## 2009-05-10 (1.1.6)
495
+ * No changes. І tested native linux gems in the last release and they don't
496
+ play well with different ruby versions other than the one the gem was built
497
+ with. This release is just to bump the version number in order to skip the
498
+ native gem on rubyforge.
499
+
500
+ ## 2009-05-10 (1.1.5)
501
+ * Started to build gems with rake-compiler gem.
502
+ * Applied patch object/array class patch from Brian Candler
503
+ <B.Candler@pobox.com> and fixes.
504
+
505
+ ## 2009-04-01 (1.1.4)
506
+ * Fixed a bug in the creation of serialized generic rails objects reported by
507
+ Friedrich Graeter <graeter@hydrixos.org>.
508
+ * Deleted tests/runner.rb, we're using testrb instead.
509
+ * Editor supports Infinity in numbers now.
510
+ * Made some changes in order to get the library to compile/run under Ruby
511
+ 1.9.
512
+ * Improved speed of the code path for the fast_generate method in the pure
513
+ variant.
514
+
515
+ ## 2008-07-10 (1.1.3)
516
+ * Wesley Beary <monki@geemus.com> reported a bug in json/add/core's DateTime
517
+ handling: If the nominator and denominator of the offset were divisible by
518
+ each other Ruby's Rational#to_s returns them as an integer not a fraction
519
+ with '/'. This caused a ZeroDivisionError during parsing.
520
+ * Use Date#start and DateTime#start instead of sg method, while
521
+ remaining backwards compatible.
522
+ * Supports ragel >= 6.0 now.
523
+ * Corrected some tests.
524
+ * Some minor changes.
525
+
526
+ ## 2007-11-27 (1.1.2)
527
+ * Remember default dir (last used directory) in editor.
528
+ * JSON::Editor.edit method added, the editor can now receive json texts from
529
+ the clipboard via C-v.
530
+ * Load json texts from an URL pasted via middle button press.
531
+ * Added :create_additions option to Parser. This makes it possible to disable
532
+ the creation of additions by force, in order to treat json texts as data
533
+ while having additions loaded.
534
+ * Jacob Maine <jmaine@blurb.com> reported, that JSON(:foo) outputs a JSON
535
+ object if the rails addition is enabled, which is wrong. It now outputs a
536
+ JSON string "foo" instead, like suggested by Jacob Maine.
537
+ * Discovered a bug in the Ruby Bugs Tracker on rubyforge, that was reported
538
+ by John Evans lgastako@gmail.com. He could produce a crash in the JSON
539
+ generator by returning something other than a String instance from a
540
+ to_json method. I now guard against this by doing a rather crude type
541
+ check, which raises an exception instead of crashing.
542
+
543
+ ## 2007-07-06 (1.1.1)
544
+ * Yui NARUSE <naruse@airemix.com> sent some patches to fix tests for Ruby
545
+ 1.9. I applied them and adapted some of them a bit to run both on 1.8 and
546
+ 1.9.
547
+ * Introduced a `JSON.parse!` method without depth checking for people who
548
+ like danger.
549
+ * Made generate and `pretty_generate` methods configurable by an options hash.
550
+ * Added :allow_nan option to parser and generator in order to handle NaN,
551
+ Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers,
552
+ aren't valid JSON according to RFC4627, so by default an exception will be
553
+ raised if any of these symbols are encountered. Thanks to Andrea Censi
554
+ <andrea.censi@dis.uniroma1.it> for his hint about this.
555
+ * Fixed some more tests for Ruby 1.9.
556
+ * Implemented dump/load interface of Marshal as suggested in ruby-core:11405
557
+ by murphy <murphy@rubychan.de>.
558
+ * Implemented the `max_nesting` feature for generate methods, too.
559
+ * Added some implementations for ruby core's custom objects for
560
+ serialisation/deserialisation purposes.
561
+
562
+ ## 2007-05-21 (1.1.0)
563
+ * Implemented max_nesting feature for parser to avoid stack overflows for
564
+ data from untrusted sources. If you trust the source, you can disable it
565
+ with the option max_nesting => false.
566
+ * Piers Cawley <pdcawley@bofh.org.uk> reported a bug, that not every
567
+ character can be escaped by `\` as required by RFC4627. There's a
568
+ contradiction between David Crockford's JSON checker test vectors (in
569
+ tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
570
+ the JSON checker seems to be a bit older than the RFC.
571
+ * Extended license to Ruby License, which includes the GPL.
572
+ * Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb.
573
+
574
+ ## 2007-05-09 (1.0.4)
575
+ * Applied a patch from Yui NARUSE <naruse@airemix.com> to make JSON compile
576
+ under Ruby 1.9. Thank you very much for mailing it to me!
577
+ * Made binary variants of JSON fail early, instead of falling back to the
578
+ pure version. This should avoid overshadowing of eventual problems while
579
+ loading of the binary.
580
+
581
+ ## 2007-03-24 (1.0.3)
582
+ * Improved performance of pure variant a bit.
583
+ * The ext variant of this release supports the mswin32 platform. Ugh!
584
+
585
+ ## 2007-03-24 (1.0.2)
586
+ * Ext Parser didn't parse 0e0 correctly into 0.0: Fixed!
587
+
588
+ ## 2007-03-24 (1.0.1)
589
+ * Forgot some object files in the build dir. I really like that - not!
590
+
591
+ ## 2007-03-24 (1.0.0)
592
+ * Added C implementations for the JSON generator and a ragel based JSON
593
+ parser in C.
594
+ * Much more tests, especially fixtures from json.org.
595
+ * Further improved conformance to RFC4627.
596
+
597
+ ## 2007-02-09 (0.4.3)
598
+ * Conform more to RFC4627 for JSON: This means JSON strings
599
+ now always must contain exactly one object `"{ ... }"` or array `"[ ... ]"` in
600
+ order to be parsed without raising an exception. The definition of what
601
+ constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
602
+ there are differences in floats and integers (no octals or hexadecimals) as
603
+ well.
604
+ * Added aliases generate and `pretty_generate` of unparse and `pretty_unparse`.
605
+ * Fixed a test case.
606
+ * Catch an `Iconv::InvalidEncoding` exception, that seems to occur on some Sun
607
+ boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
608
+ reported by Andrew R Jackson <andrewj@bcm.tmc.edu>, thanks a bunch!
609
+
610
+ ## 2006-08-25 (0.4.2)
611
+ * Fixed a bug in handling solidi (/-characters), that was reported by
612
+ Kevin Gilpin <kevin.gilpin@alum.mit.edu>.
613
+
614
+ ## 2006-02-06 (0.4.1)
615
+ * Fixed a bug related to escaping with backslashes. Thanks for the report go
616
+ to Florian Munz <surf@theflow.de>.
617
+
618
+ ## 2005-09-23 (0.4.0)
619
+ * Initial Rubyforge Version