json-extended 2.20.0

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.
data/CHANGES.md ADDED
@@ -0,0 +1,798 @@
1
+ # Changes
2
+
3
+ ### Unreleased
4
+
5
+ ### 2026-06-23 (2.20.0)
6
+
7
+ * Both C and Java parsers are no longer recursive, so parsing very deep documents with `max_nesting: false` will no longer
8
+ result in `SystemStackError stack level too deep` errors.
9
+ * The `:max_nesting` option still defaults to `100`.
10
+ * Optimized floating point number parsing further by replacing the ryu algorithm by a port of Eisel-Lemire Fast Float.
11
+ * Added `JSON::ResumableParser` to parse streams of JSON documents. Not yet available on JRuby.
12
+ * Deprecate default support of JavaScript comments in the parser and add `allow_comments: true` parsing option.
13
+ * Integrate with Ruby 4.1 `ruby_sized_xfree`.
14
+
15
+ ### 2026-06-11 (2.19.9)
16
+
17
+ * Fix buffer overflow that could lead to a crash when writing JSON directly into an IO
18
+ with `JSON.generate(object, io)`. [CVE-2026-54696].
19
+
20
+ ### 2026-06-03 (2.19.8)
21
+
22
+ * Fix 1-byte buffer overread on EOS errors.
23
+ * Handle invalid types passed as `max_nesting` option.
24
+
25
+ ### 2026-05-28 (2.19.7)
26
+
27
+ * Fix some more edge cases with out of range floats.
28
+ * Ensure the string provided to `JSON.parse` can't be mutated during parsing.
29
+ * Add missing write barriers in `State#dup`.
30
+ * Further validate generator `depth` config.
31
+
32
+ ### 2026-05-28 (2.19.6)
33
+
34
+ * Cleanly handle overly large `depth` generator argument.
35
+ * Add missing write barrier in `ParserConfig`.
36
+
37
+ ### 2026-05-04 (2.19.5)
38
+
39
+ * Cap the parser to emit a maximum of 5 deprecation warnings per document. Emitting more is not helpful.
40
+
41
+ ### 2026-04-19 (2.19.4)
42
+
43
+ * Fix parsing of out of range floats (very large exponents that lead to either `0.0` or `Inf`).
44
+
45
+ ### 2026-03-25 (2.19.3)
46
+
47
+ * Fix handling of unescaped control characters preceeded by a backslash.
48
+
49
+ ### 2026-03-18 (2.19.2)
50
+
51
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
52
+
53
+ ### 2026-03-08 (2.19.1)
54
+
55
+ * Fix a compiler dependent GC bug introduced in `2.18.0`.
56
+
57
+ ### 2026-03-06 (2.19.0)
58
+
59
+ * Fix `allow_blank` parsing option to no longer allow invalid types (e.g. `load([], allow_blank: true)` now raise a type error).
60
+ * Add `allow_invalid_escape` parsing option to ignore backslashes that aren't followed by one of the valid escape characters.
61
+
62
+ ### 2026-02-03 (2.18.1)
63
+
64
+ * Fix a potential crash in very specific circumstance if GC triggers during a call to `to_json`
65
+ without first invoking a user defined `#to_json` method.
66
+
67
+ ### 2025-12-11 (2.18.0)
68
+
69
+ * Add `:allow_control_characters` parser options, to allow JSON strings containing unescaped ASCII control characters (e.g. newlines).
70
+
71
+ ### 2026-03-18 (2.17.1.2) - Security Backport
72
+
73
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
74
+
75
+ ### 2025-12-04 (2.17.1)
76
+
77
+ * Fix a regression in parsing of unicode surogate pairs (`\uXX\uXX`) that could cause an invalid string to be returned.
78
+
79
+ ### 2025-12-03 (2.17.0)
80
+
81
+ * Improve `JSON.load` and `JSON.unsafe_load` to allow passing options as second argument.
82
+ * Fix the parser to no longer ignore invalid escapes in strings.
83
+ Only `\"`, `\\`, `\b`, `\f`, `\n`, `\r`, `\t` and `\u` are valid JSON escapes.
84
+ * Fixed `JSON::Coder` to use the depth it was initialized with.
85
+ * On TruffleRuby, fix the generator to not call `to_json` on the return value of `as_json` for `Float::NAN`.
86
+ * Fixed handling of `state.depth`: when `to_json` changes `state.depth` but does not restore it, it is reset
87
+ automatically to its initial value.
88
+ In particular, when a `NestingError` is raised, `depth` is no longer equal to `max_nesting` after the call to
89
+ generate, and is reset to its initial value. Similarly when `to_json` raises an exception.
90
+
91
+ ### 2025-11-07 (2.16.0)
92
+
93
+ * Deprecate `JSON::State#[]` and `JSON::State#[]=`. Consider using `JSON::Coder` instead.
94
+ * `JSON::Coder` now also yields to the block when encountering strings with invalid encoding.
95
+ * Fix GeneratorError messages to be UTF-8 encoded.
96
+ * Fix memory leak when `Exception` is raised, or `throw` is used during JSON generation.
97
+ * Optimized floating point number parsing by integrating the ryu algorithm (thanks to Josef Šimánek).
98
+ * Optimized numbers parsing using SWAR (thanks to Scott Myron).
99
+ * Optimized parsing of pretty printed documents using SWAR (thanks to Scott Myron).
100
+
101
+ ### 2026-03-18 (2.15.2.1) - Security Backport
102
+
103
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
104
+
105
+ ### 2025-10-25 (2.15.2)
106
+
107
+ * Fix `JSON::Coder` to have one dedicated depth counter per invocation.
108
+ After encountering a circular reference in `JSON::Coder#dump`, any further `#dump` call would raise `JSON::NestingError`.
109
+
110
+ ### 2025-10-07 (2.15.1)
111
+
112
+ * Fix incorrect escaping in the JRuby extension when encoding shared strings.
113
+
114
+ ### 2025-09-22 (2.15.0)
115
+
116
+ * `JSON::Coder` callback now receive a second argument to convey whether the object is a hash key.
117
+ * Tuned the floating point number generator to not use scientific notation as aggressively.
118
+
119
+ ### 2025-09-18 (2.14.1)
120
+
121
+ * Fix `IndexOutOfBoundsException` in the JRuby extension when encoding shared strings.
122
+
123
+ ### 2025-09-18 (2.14.0)
124
+
125
+ * Add new `allow_duplicate_key` generator options. By default a warning is now emitted when a duplicated key is encountered.
126
+ In `json 3.0` an error will be raised.
127
+ ```ruby
128
+ >> Warning[:deprecated] = true
129
+ >> puts JSON.generate({ foo: 1, "foo" => 2 })
130
+ (irb):2: warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}.
131
+ This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
132
+ {"foo":1,"foo":2}
133
+ >> JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false)
134
+ detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError)
135
+ ```
136
+ * Fix `JSON.generate` `strict: true` mode to also restrict hash keys.
137
+ * Fix `JSON::Coder` to also invoke block for hash keys that aren't strings nor symbols.
138
+ * Fix `JSON.unsafe_load` usage with proc
139
+ * Fix the parser to more consistently reject invalid UTF-16 surogate pairs.
140
+ * Stop defining `String.json_create`, `String#to_json_raw`, `String#to_json_raw_object` when `json/add` isn't loaded.
141
+
142
+ ### 2025-07-28 (2.13.2)
143
+
144
+ * Improve duplicate key warning and errors to include the key name and point to the right caller.
145
+
146
+ ### 2025-07-24 (2.13.1)
147
+
148
+ * Fix support for older compilers without `__builtin_cpu_supports`.
149
+
150
+ ### 2025-07-17 (2.13.0)
151
+
152
+ * Add new `allow_duplicate_key` parsing options. By default a warning is now emitted when a duplicated key is encountered.
153
+ In `json 3.0` an error will be raised.
154
+ * Optimize parsing further using SIMD to scan strings.
155
+
156
+ ### 2025-05-23 (2.12.2)
157
+
158
+ * Fix compiler optimization level.
159
+
160
+ ### 2025-05-23 (2.12.1)
161
+
162
+ * Fix a potential crash in large negative floating point number generation.
163
+ * Fix for JSON.pretty_generate to use passed state object's generate instead of state class as the required parameters aren't available.
164
+
165
+ ### 2025-05-12 (2.12.0)
166
+
167
+ * Improve floating point generation to not use scientific notation as much.
168
+ * Include line and column in parser errors. Both in the message and as exception attributes.
169
+ * Handle non-string hash keys with broken `to_s` implementations.
170
+ * `JSON.generate` now uses SSE2 (x86) or NEON (arm64) instructions when available to escape strings.
171
+
172
+ ### 2025-04-25 (2.11.3)
173
+
174
+ * Fix a regression in `JSON.pretty_generate` that could cause indentation to be off once some `#to_json` has been called.
175
+
176
+ ### 2025-04-24 (2.11.2)
177
+
178
+ * Add back `JSON::PRETTY_STATE_PROTOTYPE`. This constant was private API but is used by popular gems like `multi_json`.
179
+ It now emits a deprecation warning.
180
+
181
+ ### 2025-04-24 (2.11.1)
182
+
183
+ * Add back `JSON.restore`, `JSON.unparse`, `JSON.fast_unparse` and `JSON.pretty_unparse`.
184
+ These were deprecated 16 years ago, but never emitted warnings, only undocumented, so are
185
+ still used by a few gems.
186
+
187
+ ### 2025-04-24 (2.11.0)
188
+
189
+ * Optimize Integer generation to be ~1.8x faster.
190
+ * Optimize Float generation to be ~10x faster.
191
+ * Fix `JSON.load` proc argument to substitute the parsed object with the return value.
192
+ This better match `Marshal.load` behavior.
193
+ * Deprecate `JSON.fast_generate` (it's not any faster, so pointless).
194
+ * Deprecate `JSON.load_default_options`.
195
+ * Deprecate `JSON.unsafe_load_default_options`.
196
+ * Deprecate `JSON.dump_default_options`.
197
+ * Deprecate `Kernel#j`
198
+ * Deprecate `Kernel#jj`
199
+ * Remove outdated `JSON.iconv`.
200
+ * Remove `Class#json_creatable?` monkey patch.
201
+ * Remove deprecated `JSON.restore` method.
202
+ * Remove deprecated `JSON.unparse` method.
203
+ * Remove deprecated `JSON.fast_unparse` method.
204
+ * Remove deprecated `JSON.pretty_unparse` method.
205
+ * Remove deprecated `JSON::UnparserError` constant.
206
+ * Remove outdated `JSON::MissingUnicodeSupport` constant.
207
+
208
+ ### 2025-03-12 (2.10.2)
209
+
210
+ * Fix a potential crash in the C extension parser.
211
+ * Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until `2.10.0` inadvertently changed it.
212
+ * Ensure document snippets that are included in parser errors don't include truncated multibyte characters.
213
+ * Ensure parser error snippets are valid UTF-8.
214
+ * Fix `JSON::GeneratorError#detailed_message` on Ruby < 3.2
215
+
216
+ ### 2025-02-10 (2.10.1)
217
+
218
+ * Fix a compatibility issue with `MultiJson.dump(obj, pretty: true)`: `no implicit conversion of false into Proc (TypeError)`.
219
+
220
+ ### 2025-02-10 (2.10.0)
221
+
222
+ * `strict: true` now accept symbols as values. Previously they'd only be accepted as hash keys.
223
+ * The C extension Parser has been entirely reimplemented from scratch.
224
+ * Introduced `JSON::Coder` as a new API allowing to customize how non native types are serialized in a non-global way.
225
+ * Introduced `JSON::Fragment` to allow assembling cached fragments in a safe way.
226
+ * The Java implementation of the generator received many optimizations.
227
+
228
+ ### 2024-12-18 (2.9.1)
229
+
230
+ * Fix support for Solaris 10.
231
+
232
+ ### 2024-12-03 (2.9.0)
233
+
234
+ * Fix C implementation of `script_safe` escaping to not confuse some other 3 wide characters with `\u2028` and `\u2029`.
235
+ e.g. `JSON.generate(["倩", "瀨"], script_safe: true)` would generate the wrong JSON.
236
+ * `JSON.dump(object, some_io)` now write into the IO in chunks while previously it would buffer the entire JSON before writing.
237
+ * `JSON::GeneratorError` now has a `#invalid_object` attribute, making it easier to understand why an object tree cannot be serialized.
238
+ * Numerous improvements to the JRuby extension.
239
+
240
+ ### 2024-11-14 (2.8.2)
241
+
242
+ * `JSON.load_file` explicitly read the file as UTF-8.
243
+
244
+ ### 2024-11-06 (2.8.1)
245
+
246
+ * Fix the java packages to include the extension.
247
+
248
+ ### 2024-11-06 (2.8.0)
249
+
250
+ * Emit a deprecation warning when `JSON.load` create custom types without the `create_additions` option being explicitly enabled.
251
+ * Prefer to use `JSON.unsafe_load(string)` or `JSON.load(string, create_additions: true)`.
252
+ * Emit a deprecation warning when serializing valid UTF-8 strings encoded in `ASCII_8BIT` aka `BINARY`.
253
+ * Bump required Ruby version to 2.7.
254
+ * Add support for optionally parsing trailing commas, via `allow_trailing_comma: true`, which in cunjunction with the
255
+ pre-existing support for comments, make it suitable to parse `jsonc` documents.
256
+ * Many performance improvements to `JSON.parse` and `JSON.load`, up to `1.7x` faster on real world documents.
257
+ * Some minor performance improvements to `JSON.dump` and `JSON.generate`.
258
+ * `JSON.pretty_generate` no longer includes newlines inside empty object and arrays.
259
+
260
+ ### 2024-11-04 (2.7.6)
261
+
262
+ * Fix a regression in JSON.generate when dealing with Hash keys that are string subclasses, call `to_json` on them.
263
+
264
+ ### 2024-10-25 (2.7.5)
265
+
266
+ * Fix a memory leak when `#to_json` methods raise an exception.
267
+ * Gracefully handle formatting configs being set to `nil` instead of `""`.
268
+ * Workaround another issue caused by conflicting versions of both `json_pure` and `json` being loaded.
269
+
270
+ ### 2024-10-25 (2.7.4)
271
+
272
+ * Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
273
+ This bug would cause some gems with native extension to fail during compilation.
274
+ * Workaround different versions of `json` and `json_pure` being loaded (not officially supported).
275
+ * Make `json_pure` Ractor compatible.
276
+
277
+ ### 2024-10-24 (2.7.3)
278
+
279
+ * Numerous performance optimizations in `JSON.generate` and `JSON.dump` (up to 2 times faster).
280
+ * Limit the size of ParserError exception messages, only include up to 32 bytes of the unparsable source.
281
+ * Fix json-pure's `Object#to_json` to accept non-state arguments.
282
+ * Fix multiline comment support in `json-pure`.
283
+ * Fix `JSON.parse` to no longer mutate the argument encoding when passed an ASCII-8BIT string.
284
+ * Fix `String#to_json` to raise on invalid encoding in `json-pure`.
285
+ * Delete code that was based on CVTUTF.
286
+ * Use the pure-Ruby generator on TruffleRuby.
287
+ * Fix `strict` mode in `json-pure` to not break on Integer.
288
+
289
+ ### 2024-04-04 (2.7.2)
290
+
291
+ * Use rb_sym2str instead of SYM2ID #561
292
+ * Fix memory leak when exception is raised during JSON generation #574
293
+ * Remove references to "19" methods in JRuby #576
294
+ * Make OpenStruct support as optional by @hsbt in #565
295
+ * Autoload JSON::GenericObject to avoid require ostruct warning in Ruby 3.4 #577
296
+ * Warn to install ostruct if json couldn't load it by @hsbt #578
297
+
298
+ ### 2023-12-05 (2.7.1)
299
+
300
+ * JSON.dump: handle unenclosed hashes regression #554
301
+ * Overload kwargs in JSON.dump #556
302
+ * [DOC] RDoc for additions #557
303
+ * Fix JSON.dump overload combination #558
304
+
305
+ ### 2023-12-01 (2.7.0)
306
+
307
+ * Add a strict option to Generator #519
308
+ * `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
309
+ * Remove unnecessary initialization of create_id in JSON.parse() #454
310
+ * Improvements to Hash#to_json in pure implementation generator #203
311
+ * Use ruby_xfree to free buffers #518
312
+ * Fix "unexpected token" offset for Infinity #507
313
+ * Avoid using deprecated BigDecimal.new on JRuby #546
314
+ * Removed code for Ruby 1.8 #540
315
+ * Rename JSON::ParseError to JSON:ParserError #530
316
+ * Call super in included hook #486
317
+ * JRuby requires a minimum of Java 8 #516
318
+ * Always indent even if empty #517
319
+
320
+ ### 2022-11-30 (2.6.3)
321
+
322
+ * bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError #483
323
+ * Stop including the parser source __LINE__ in exceptions #470
324
+
325
+ ### 2022-11-17 (2.6.2)
326
+
327
+ * Remove unknown keyword arg from DateTime.parse #488
328
+ * Ignore java artifacts by @hsbt #489
329
+ * Fix parser bug for empty string allocation #496
330
+
331
+ ### 2021-10-24 (2.6.1)
332
+
333
+ * Restore version.rb with 2.6.1
334
+
335
+ ### 2021-10-14 (2.6.0)
336
+
337
+ * Use `rb_enc_interned_str` if available to reduce allocations in `freeze: true` mode. #451.
338
+ * Bump required_ruby_version to 2.3.
339
+ * Fix compatibility with `GC.compact`.
340
+ * Fix some compilation warnings. #469
341
+
342
+ ## 2020-12-22 (2.5.1)
343
+
344
+ * Restore the compatibility for constants of JSON class.
345
+
346
+ ## 2020-12-22 (2.5.0)
347
+
348
+ * Ready to Ractor-safe at Ruby 3.0.
349
+
350
+ ## 2020-12-17 (2.4.1)
351
+
352
+ * Restore version.rb with 2.4.1
353
+
354
+ ## 2020-12-15 (2.4.0)
355
+
356
+ * Implement a freeze: parser option #447
357
+ * Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations #449
358
+ * Fix JSON.load_file doc #448
359
+ * Fix pure parser with unclosed arrays / objects #425
360
+ * bundle the LICENSE file in the gem #444
361
+ * Add an option to escape forward slash character #405
362
+ * RDoc for JSON #439 #446 #442 #434 #433 #430
363
+
364
+ ## 2020-06-30 (2.3.1)
365
+
366
+ * Spelling and grammar fixes for comments. Pull request #191 by Josh
367
+ Kline.
368
+ * Enhance generic JSON and #generate docs. Pull request #347 by Victor
369
+ Shepelev.
370
+ * Add :nodoc: for GeneratorMethods. Pull request #349 by Victor Shepelev.
371
+ * Baseline changes to help (JRuby) development. Pull request #371 by Karol
372
+ Bucek.
373
+ * Add metadata for rubygems.org. Pull request #379 by Alexandre ZANNI.
374
+ * Remove invalid JSON.generate description from JSON module rdoc. Pull
375
+ request #384 by Jeremy Evans.
376
+ * Test with TruffleRuby in CI. Pull request #402 by Benoit Daloze.
377
+ * Rdoc enhancements. Pull request #413 by Burdette Lamar.
378
+ * Fixtures/ are not being tested... Pull request #416 by Marc-André
379
+ Lafortune.
380
+ * Use frozen string for hash key. Pull request #420 by Marc-André
381
+ Lafortune.
382
+ * Added :call-seq: to RDoc for some methods. Pull request #422 by Burdette
383
+ Lamar.
384
+ * Small typo fix. Pull request #423 by Marc-André Lafortune.
385
+
386
+ ## 2019-12-11 (2.3.0)
387
+ * Fix default of `create_additions` to always be `false` for `JSON(user_input)`
388
+ and `JSON.parse(user_input, nil)`.
389
+ Note that `JSON.load` remains with default `true` and is meant for internal
390
+ serialization of trusted data. [CVE-2020-10663]
391
+ * Fix passing args all #to_json in json/add/*.
392
+ * Fix encoding issues
393
+ * Fix issues of keyword vs positional parameter
394
+ * Fix JSON::Parser against bigdecimal updates
395
+ * Bug fixes to JRuby port
396
+
397
+ ## 2019-02-21 (2.2.0)
398
+ * Adds support for 2.6 BigDecimal and ruby standard library Set datetype.
399
+
400
+ ## 2017-04-18 (2.1.0)
401
+ * Allow passing of `decimal_class` option to specify a class as which to parse
402
+ JSON float numbers.
403
+ ## 2017-03-23 (2.0.4)
404
+ * Raise exception for incomplete unicode surrogates/character escape
405
+ sequences. This problem was reported by Daniel Gollahon (dgollahon).
406
+ * Fix arbitrary heap exposure problem. This problem was reported by Ahmad
407
+ Sherif (ahmadsherif).
408
+
409
+ ## 2017-01-12 (2.0.3)
410
+ * Set `required_ruby_version` to 1.9
411
+ * Some small fixes
412
+
413
+ ## 2016-07-26 (2.0.2)
414
+ * Specify `required_ruby_version` for json\_pure.
415
+ * Fix issue #295 failure when parsing frozen strings.
416
+
417
+ ## 2016-07-01 (2.0.1)
418
+ * Fix problem when requiring json\_pure and Parser constant was defined top
419
+ level.
420
+ * Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
421
+ * Store `current_nesting` on stack by Aaron Patterson.
422
+
423
+ ## 2015-09-11 (2.0.0)
424
+ * Now complies to newest JSON RFC 7159.
425
+ * Implements compatibility to ruby 2.4 integer unification.
426
+ * Removed support for `quirks_mode` option.
427
+ * Drops support for old rubies whose life has ended, that is rubies < 2.0.
428
+ Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
429
+ * There were still some mentions of dual GPL licensing in the source, but JSON
430
+ has just the Ruby license that itself includes an explicit dual-licensing
431
+ clause that allows covered software to be distributed under the terms of
432
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
433
+ however a GPL compatible license according to the Free Software Foundation.
434
+ I changed these mentions to be consistent with the Ruby license setting in
435
+ the gemspec files which were already correct now.
436
+
437
+ ## 2017-01-13 (1.8.6)
438
+ * Be compatible with ancient ruby 1.8 (maybe?)
439
+
440
+ ## 2015-09-11 (1.8.5)
441
+ * Be compatible with ruby 2.4.0
442
+ * There were still some mentions of dual GPL licensing in the source, but JSON
443
+ has just the Ruby license that itself includes an explicit dual-licensing
444
+ clause that allows covered software to be distributed under the terms of
445
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
446
+ however a GPL compatible license according to the Free Software Foundation.
447
+ I changed these mentions to be consistent with the Ruby license setting in
448
+ the gemspec files which were already correct now.
449
+
450
+ ## 2015-06-01 (1.8.3)
451
+ * Fix potential memory leak, thx to nobu.
452
+
453
+ ## 2015-01-08 (1.8.2)
454
+ * Some performance improvements by Vipul A M <vipulnsward@gmail.com>.
455
+ * Fix by Jason R. Clark <jclark@newrelic.com> to avoid mutation of
456
+ `JSON.dump_default_options`.
457
+ * More tests by Michael Mac-Vicar <mmacvicar@gmail.com> and fixing
458
+ `space_before` accessor in generator.
459
+ * Performance on Jruby improved by Ben Browning <bbrownin@redhat.com>.
460
+ * Some fixes to be compatible with the new Ruby 2.2 by Zachary Scott <e@zzak.io>
461
+ and SHIBATA Hiroshi <hsbt@ruby-lang.org>.
462
+
463
+ ## 2013-05-13 (1.8.1)
464
+ * Remove Rubinius exception since transcoding should be working now.
465
+
466
+ ## 2013-05-13 (1.8.0)
467
+ * Fix https://github.com/ruby/json/issues/162 reported by Marc-Andre
468
+ Lafortune <github_rocks@marc-andre.ca>. Thanks!
469
+ * Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with
470
+ -Wchar-subscripts and better validate UTF-8 strings.
471
+ * Applied patch by ginriki@github to remove unnecessary if.
472
+ * Add load/dump interface to `JSON::GenericObject` to make
473
+ serialize :some_attribute, `JSON::GenericObject`
474
+ work in Rails active models for convenient `SomeModel#some_attribute.foo.bar`
475
+ access to serialised JSON data.
476
+
477
+ ## 2013-02-04 (1.7.7)
478
+ * Security fix for JSON create_additions default value and
479
+ `JSON::GenericObject`. It should not be possible to create additions unless
480
+ explicitly requested by setting the create_additions argument to true or
481
+ using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
482
+ be automatically deserialised, this has to be explicitly enabled by
483
+ setting
484
+ JSON::GenericObject.json_creatable = true
485
+ as well.
486
+ * Remove useless assert in fbuffer implementation.
487
+ * Apply patch attached to https://github.com/ruby/json/issues#issue/155
488
+ provided by John Shahid <jvshahid@gmail.com>, Thx!
489
+ * Add license information to rubygems spec data, reported by Jordi Massaguer Pla <jmassaguerpla@suse.de>.
490
+ * Improve documentation, thx to Zachary Scott <zachary@zacharyscott.net>.
491
+
492
+ ## 2012-11-29 (1.7.6)
493
+ * Add `GeneratorState#merge` alias for JRuby, fix state accessor methods. Thx to
494
+ jvshahid@github.
495
+ * Increase hash likeness of state objects.
496
+
497
+ ## 2012-08-17 (1.7.5)
498
+ * Fix compilation of extension on older rubies.
499
+
500
+ ## 2012-07-26 (1.7.4)
501
+ * Fix compilation problem on AIX, see https://github.com/ruby/json/issues/142
502
+
503
+ ## 2012-05-12 (1.7.3)
504
+ * Work around Rubinius encoding issues using iconv for conversion instead.
505
+
506
+ ## 2012-05-11 (1.7.2)
507
+ * Fix some encoding issues, that cause problems for the pure and the
508
+ extension variant in jruby 1.9 mode.
509
+
510
+ ## 2012-04-28 (1.7.1)
511
+ * Some small fixes for building
512
+
513
+ ## 2012-04-28 (1.7.0)
514
+ * Add `JSON::GenericObject` for method access to objects transmitted via JSON.
515
+
516
+ ## 2012-04-27 (1.6.7)
517
+ * Fix possible crash when trying to parse nil value.
518
+
519
+ ## 2012-02-11 (1.6.6)
520
+ * Propagate src encoding to values made from it (fixes 1.9 mode converting
521
+ everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo
522
+ <tom.enebo@gmail.com>), should fix
523
+ https://github.com/ruby/json/issues#issue/119.
524
+ * Fix https://github.com/ruby/json/issues#issue/124 Thx to Jason Hutchens.
525
+ * Fix https://github.com/ruby/json/issues#issue/117
526
+
527
+ ## 2012-01-15 (1.6.5)
528
+ * Vit Ondruch <v.ondruch@tiscali.cz> reported a bug that shows up when using
529
+ optimisation under GCC 4.7. Thx to him, Bohuslav Kabrda
530
+ <bkabrda@redhat.com> and Yui NARUSE <naruse@airemix.jp> for debugging and
531
+ developing a patch fix.
532
+
533
+ ## 2011-12-24 (1.6.4)
534
+ * Patches that improve speed on JRuby contributed by Charles Oliver Nutter
535
+ <headius@headius.com>.
536
+ * Support `object_class`/`array_class` with duck typed hash/array.
537
+
538
+ ## 2011-12-01 (1.6.3)
539
+ * Let `JSON.load('')` return nil as well to make mysql text columns (default to
540
+ `''`) work better for serialization.
541
+
542
+ ## 2011-11-21 (1.6.2)
543
+ * Add support for OpenStruct and BigDecimal.
544
+ * Fix bug when parsing nil in `quirks_mode`.
545
+ * Make JSON.dump and JSON.load methods better cooperate with Rails' serialize
546
+ method. Just use:
547
+ serialize :value, JSON
548
+ * Fix bug with time serialization concerning nanoseconds. Thanks for the
549
+ patch go to Josh Partlow (jpartlow@github).
550
+ * Improve parsing speed for JSON numbers (integers and floats) in a similar way to
551
+ what Evan Phoenix <evan@phx.io> suggested in:
552
+ https://github.com/ruby/json/pull/103
553
+
554
+ ## 2011-09-18 (1.6.1)
555
+ * Using -target 1.5 to force Java bits to compile with 1.5.
556
+
557
+ ## 2011-09-12 (1.6.0)
558
+ * Extract utilities (prettifier and GUI-editor) in its own gem json-utils.
559
+ * Split json/add/core into different files for classes to be serialised.
560
+
561
+ ## 2011-08-31 (1.5.4)
562
+ * Fix memory leak when used from multiple JRuby. (Patch by
563
+ jfirebaugh@github).
564
+ * Apply patch by Eric Wong <nocode@yhbt.net> that fixes garbage collection problem
565
+ reported in https://github.com/ruby/json/issues/46.
566
+ * Add :quirks_mode option to parser and generator.
567
+ * Add support for Rational and Complex number additions via json/add/complex
568
+ and json/add/rational requires.
569
+
570
+ ## 2011-06-20 (1.5.3)
571
+ * Alias State#configure method as State#merge to increase duck type synonymy with Hash.
572
+ * Add `as_json` methods in json/add/core, so rails can create its json objects the new way.
573
+
574
+ ## 2011-05-11 (1.5.2)
575
+ * Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
576
+ * Add gemspecs for json and json\_pure.
577
+ * Fix bug in jruby pretty printing.
578
+ * Fix bug in `object_class` and `array_class` when inheriting from Hash or
579
+ Array.
580
+
581
+ ## 2011-01-24 (1.5.1)
582
+ * Made rake-compiler build a fat binary gem. This should fix issue
583
+ https://github.com/ruby/json/issues#issue/54.
584
+
585
+ ## 2011-01-22 (1.5.0)
586
+ * Included Java source codes for the Jruby extension made by Daniel Luz
587
+ <dev@mernen.com>.
588
+ * Output full exception message of `deep_const_get` to aid debugging.
589
+ * Fixed an issue with ruby 1.9 `Module#const_defined?` method, that was
590
+ reported by Riley Goodside.
591
+
592
+ ## 2010-08-09 (1.4.6)
593
+ * Fixed oversight reported in http://github.com/ruby/json/issues/closed#issue/23,
594
+ always create a new object from the state prototype.
595
+ * Made pure and ext api more similar again.
596
+
597
+ ## 2010-08-07 (1.4.5)
598
+ * Manage data structure nesting depth in state object during generation. This
599
+ should reduce problems with `to_json` method definіtions that only have one
600
+ argument.
601
+ * Some fixes in the state objects and additional tests.
602
+ ## 2010-08-06 (1.4.4)
603
+ * Fixes build problem for rubinius under OS X, http://github.com/ruby/json/issues/closed#issue/25
604
+ * Fixes crashes described in http://github.com/ruby/json/issues/closed#issue/21 and
605
+ http://github.com/ruby/json/issues/closed#issue/23
606
+ ## 2010-05-05 (1.4.3)
607
+ * Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
608
+ * Fixed issue http://github.com/ruby/json/issues/#issue/20 reported by
609
+ electronicwhisper@github. Thx!
610
+
611
+ ## 2010-04-26 (1.4.2)
612
+ * Applied patch from naruse Yui NARUSE <naruse@airemix.com> to make building with
613
+ Microsoft Visual C possible again.
614
+ * Applied patch from devrandom <c1.github@niftybox.net> in order to allow building of
615
+ json_pure if extensiontask is not present.
616
+ * Thanks to Dustin Schneider <dustin@stocktwits.com>, who reported a memory
617
+ leak, which is fixed in this release.
618
+ * Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github.
619
+
620
+ ## 2010-04-25 (1.4.1)
621
+ * Fix for a bug reported by Dan DeLeo <dan@kallistec.com>, caused by T_FIXNUM
622
+ being different on 32bit/64bit architectures.
623
+
624
+ ## 2010-04-23 (1.4.0)
625
+ * Major speed improvements and building with simplified
626
+ directory/file-structure.
627
+ * Extension should at least be compatible with MRI, YARV and Rubinius.
628
+
629
+ ## 2010-04-07 (1.2.4)
630
+ * Trigger const_missing callback to make Rails' dynamic class loading work.
631
+
632
+ ## 2010-03-11 (1.2.3)
633
+ * Added a `State#[]` method which returns an attribute's value in order to
634
+ increase duck type compatibility to Hash.
635
+
636
+ ## 2010-02-27 (1.2.2)
637
+ * Made some changes to make the building of the parser/generator compatible
638
+ to Rubinius.
639
+
640
+ ## 2009-11-25 (1.2.1)
641
+ * Added `:symbolize_names` option to Parser, which returns symbols instead of
642
+ strings in object names/keys.
643
+
644
+ ## 2009-10-01 (1.2.0)
645
+ * `fast_generate` now raises an exception for nan and infinite floats.
646
+ * On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
647
+ and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
648
+ functions are used to convert from all supported encodings. ASCII-8BIT
649
+ encoded strings are handled like all strings under Ruby 1.8 were.
650
+ * Better documentation
651
+
652
+ ## 2009-08-23 (1.1.9)
653
+ * Added forgotten main doc file `extra_rdoc_files`.
654
+
655
+ ## 2009-08-23 (1.1.8)
656
+ * Applied a patch by OZAWA Sakuro <sakuro@2238club.org> to make json/pure
657
+ work in environments that don't provide iconv.
658
+ * Applied patch by okkez_ in order to fix Ruby Bug #1768:
659
+ http://redmine.ruby-lang.org/issues/show/1768.
660
+ * Finally got around to avoid the rather paranoid escaping of ?/ characters
661
+ in the generator's output. The parsers aren't affected by this change.
662
+ Thanks to Rich Apodaca <rapodaca@metamolecular.com> for the suggestion.
663
+
664
+ ## 2009-06-29 (1.1.7)
665
+ * Security Fix for JSON::Pure::Parser. A specially designed string could
666
+ cause catastrophic backtracking in one of the parser's regular expressions
667
+ in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
668
+ Thanks to Bartosz Blimke <bartosz@new-bamboo.co.uk> for reporting this
669
+ problem.
670
+ * This release also uses a less strict ruby version requirement for the
671
+ creation of the mswin32 native gem.
672
+
673
+ ## 2009-05-10 (1.1.6)
674
+ * No changes. І tested native linux gems in the last release and they don't
675
+ play well with different ruby versions other than the one the gem was built
676
+ with. This release is just to bump the version number in order to skip the
677
+ native gem on rubyforge.
678
+
679
+ ## 2009-05-10 (1.1.5)
680
+ * Started to build gems with rake-compiler gem.
681
+ * Applied patch object/array class patch from Brian Candler
682
+ <B.Candler@pobox.com> and fixes.
683
+
684
+ ## 2009-04-01 (1.1.4)
685
+ * Fixed a bug in the creation of serialized generic rails objects reported by
686
+ Friedrich Graeter <graeter@hydrixos.org>.
687
+ * Deleted tests/runner.rb, we're using testrb instead.
688
+ * Editor supports Infinity in numbers now.
689
+ * Made some changes in order to get the library to compile/run under Ruby
690
+ 1.9.
691
+ * Improved speed of the code path for the fast_generate method in the pure
692
+ variant.
693
+
694
+ ## 2008-07-10 (1.1.3)
695
+ * Wesley Beary <monki@geemus.com> reported a bug in json/add/core's DateTime
696
+ handling: If the nominator and denominator of the offset were divisible by
697
+ each other Ruby's Rational#to_s returns them as an integer not a fraction
698
+ with '/'. This caused a ZeroDivisionError during parsing.
699
+ * Use Date#start and DateTime#start instead of sg method, while
700
+ remaining backwards compatible.
701
+ * Supports ragel >= 6.0 now.
702
+ * Corrected some tests.
703
+ * Some minor changes.
704
+
705
+ ## 2007-11-27 (1.1.2)
706
+ * Remember default dir (last used directory) in editor.
707
+ * JSON::Editor.edit method added, the editor can now receive json texts from
708
+ the clipboard via C-v.
709
+ * Load json texts from an URL pasted via middle button press.
710
+ * Added :create_additions option to Parser. This makes it possible to disable
711
+ the creation of additions by force, in order to treat json texts as data
712
+ while having additions loaded.
713
+ * Jacob Maine <jmaine@blurb.com> reported, that JSON(:foo) outputs a JSON
714
+ object if the rails addition is enabled, which is wrong. It now outputs a
715
+ JSON string "foo" instead, like suggested by Jacob Maine.
716
+ * Discovered a bug in the Ruby Bugs Tracker on rubyforge, that was reported
717
+ by John Evans lgastako@gmail.com. He could produce a crash in the JSON
718
+ generator by returning something other than a String instance from a
719
+ to_json method. I now guard against this by doing a rather crude type
720
+ check, which raises an exception instead of crashing.
721
+
722
+ ## 2007-07-06 (1.1.1)
723
+ * Yui NARUSE <naruse@airemix.com> sent some patches to fix tests for Ruby
724
+ 1.9. I applied them and adapted some of them a bit to run both on 1.8 and
725
+ 1.9.
726
+ * Introduced a `JSON.parse!` method without depth checking for people who
727
+ like danger.
728
+ * Made generate and `pretty_generate` methods configurable by an options hash.
729
+ * Added :allow_nan option to parser and generator in order to handle NaN,
730
+ Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers,
731
+ aren't valid JSON according to RFC4627, so by default an exception will be
732
+ raised if any of these symbols are encountered. Thanks to Andrea Censi
733
+ <andrea.censi@dis.uniroma1.it> for his hint about this.
734
+ * Fixed some more tests for Ruby 1.9.
735
+ * Implemented dump/load interface of Marshal as suggested in ruby-core:11405
736
+ by murphy <murphy@rubychan.de>.
737
+ * Implemented the `max_nesting` feature for generate methods, too.
738
+ * Added some implementations for ruby core's custom objects for
739
+ serialisation/deserialisation purposes.
740
+
741
+ ## 2007-05-21 (1.1.0)
742
+ * Implemented max_nesting feature for parser to avoid stack overflows for
743
+ data from untrusted sources. If you trust the source, you can disable it
744
+ with the option max_nesting => false.
745
+ * Piers Cawley <pdcawley@bofh.org.uk> reported a bug, that not every
746
+ character can be escaped by `\` as required by RFC4627. There's a
747
+ contradiction between David Crockford's JSON checker test vectors (in
748
+ tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
749
+ the JSON checker seems to be a bit older than the RFC.
750
+ * Extended license to Ruby License, which includes the GPL.
751
+ * Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb.
752
+
753
+ ## 2007-05-09 (1.0.4)
754
+ * Applied a patch from Yui NARUSE <naruse@airemix.com> to make JSON compile
755
+ under Ruby 1.9. Thank you very much for mailing it to me!
756
+ * Made binary variants of JSON fail early, instead of falling back to the
757
+ pure version. This should avoid overshadowing of eventual problems while
758
+ loading of the binary.
759
+
760
+ ## 2007-03-24 (1.0.3)
761
+ * Improved performance of pure variant a bit.
762
+ * The ext variant of this release supports the mswin32 platform. Ugh!
763
+
764
+ ## 2007-03-24 (1.0.2)
765
+ * Ext Parser didn't parse 0e0 correctly into 0.0: Fixed!
766
+
767
+ ## 2007-03-24 (1.0.1)
768
+ * Forgot some object files in the build dir. I really like that - not!
769
+
770
+ ## 2007-03-24 (1.0.0)
771
+ * Added C implementations for the JSON generator and a ragel based JSON
772
+ parser in C.
773
+ * Much more tests, especially fixtures from json.org.
774
+ * Further improved conformance to RFC4627.
775
+
776
+ ## 2007-02-09 (0.4.3)
777
+ * Conform more to RFC4627 for JSON: This means JSON strings
778
+ now always must contain exactly one object `"{ ... }"` or array `"[ ... ]"` in
779
+ order to be parsed without raising an exception. The definition of what
780
+ constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
781
+ there are differences in floats and integers (no octals or hexadecimals) as
782
+ well.
783
+ * Added aliases generate and `pretty_generate` of unparse and `pretty_unparse`.
784
+ * Fixed a test case.
785
+ * Catch an `Iconv::InvalidEncoding` exception, that seems to occur on some Sun
786
+ boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
787
+ reported by Andrew R Jackson <andrewj@bcm.tmc.edu>, thanks a bunch!
788
+
789
+ ## 2006-08-25 (0.4.2)
790
+ * Fixed a bug in handling solidi (/-characters), that was reported by
791
+ Kevin Gilpin <kevin.gilpin@alum.mit.edu>.
792
+
793
+ ## 2006-02-06 (0.4.1)
794
+ * Fixed a bug related to escaping with backslashes. Thanks for the report go
795
+ to Florian Munz <surf@theflow.de>.
796
+
797
+ ## 2005-09-23 (0.4.0)
798
+ * Initial Rubyforge Version