json 2.6.1 → 2.21.1

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/BSDL +22 -0
  3. data/CHANGES.md +370 -17
  4. data/LEGAL +20 -0
  5. data/README.md +96 -213
  6. data/ext/json/ext/fbuffer/fbuffer.h +190 -118
  7. data/ext/json/ext/generator/extconf.rb +17 -2
  8. data/ext/json/ext/generator/generator.c +1532 -1074
  9. data/ext/json/ext/json.h +183 -0
  10. data/ext/json/ext/parser/extconf.rb +30 -25
  11. data/ext/json/ext/parser/parser.c +2837 -3258
  12. data/ext/json/ext/simd/conf.rb +24 -0
  13. data/ext/json/ext/simd/simd.h +208 -0
  14. data/ext/json/ext/vendor/fast_float_parser.h +814 -0
  15. data/ext/json/ext/vendor/fpconv.c +480 -0
  16. data/ext/json/ext/vendor/jeaiii-ltoa.h +267 -0
  17. data/json.gemspec +48 -53
  18. data/lib/json/add/bigdecimal.rb +39 -10
  19. data/lib/json/add/complex.rb +29 -6
  20. data/lib/json/add/core.rb +2 -1
  21. data/lib/json/add/date.rb +27 -7
  22. data/lib/json/add/date_time.rb +26 -9
  23. data/lib/json/add/exception.rb +25 -7
  24. data/lib/json/add/ostruct.rb +32 -9
  25. data/lib/json/add/range.rb +33 -8
  26. data/lib/json/add/rational.rb +28 -6
  27. data/lib/json/add/regexp.rb +26 -8
  28. data/lib/json/add/set.rb +25 -6
  29. data/lib/json/add/string.rb +35 -0
  30. data/lib/json/add/struct.rb +29 -7
  31. data/lib/json/add/symbol.rb +34 -7
  32. data/lib/json/add/time.rb +29 -15
  33. data/lib/json/common.rb +746 -267
  34. data/lib/json/ext/generator/state.rb +104 -0
  35. data/lib/json/ext.rb +61 -5
  36. data/lib/json/generic_object.rb +7 -11
  37. data/lib/json/truffle_ruby/generator.rb +790 -0
  38. data/lib/json/version.rb +3 -7
  39. data/lib/json.rb +134 -24
  40. metadata +22 -26
  41. data/VERSION +0 -1
  42. data/ext/json/ext/generator/depend +0 -1
  43. data/ext/json/ext/generator/generator.h +0 -174
  44. data/ext/json/ext/parser/depend +0 -1
  45. data/ext/json/ext/parser/parser.h +0 -96
  46. data/ext/json/ext/parser/parser.rl +0 -977
  47. data/ext/json/extconf.rb +0 -3
  48. data/lib/json/pure/generator.rb +0 -479
  49. data/lib/json/pure/parser.rb +0 -337
  50. data/lib/json/pure.rb +0 -15
  51. /data/{LICENSE → COPYING} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28754306f4a5a73cb18a8a02a519b8efcfb84ff59c2cece37ba9c37dd157c29c
4
- data.tar.gz: 3bdeda4996bde6e7f28e55cfd47dd278d5f65ed709ac5ec444da46a0fa878621
3
+ metadata.gz: bd45f22d143e0edbca7ee9ba8209d10fd58f1b21f5e095d7a4c2938d12ea1041
4
+ data.tar.gz: 7104d723fe198b21508897a5583fcb513407595df0fdb0240c0343481cac7e06
5
5
  SHA512:
6
- metadata.gz: 2b760312c30f7a69b57abc61f19ca2ca06a7d592d2dd5f51fe8d06c42763a74f91ef5474c339c4c8f8e6a1e29de1886e5e3e63ecc474ed205a9a1a49c4c1014c
7
- data.tar.gz: 54a87c4287805b5af55c34578623d79b33f7a1c04ed739e3265423153a1e95952bc888adc5c0613c6e6ba48df96aa995eff9e74cc715491200db61707d3aa356
6
+ metadata.gz: 554e73a89035e122a9643ecdd611ca893dbcfee74d86b9dd1ed8ea1fb2d0ddfc84416458efeff5b71925922e8e59c1c60aa90a172a411c6a33e3069a41e328d5
7
+ data.tar.gz: 4746639e1e86fff01e23ecbc036bae1410e6e944687ad576daf297f4d50f792334d0bef5a2864b0f2fe7e32495d7c205be2b666c811985f7168d0c2c8b1892f8
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 CHANGED
@@ -1,5 +1,345 @@
1
1
  # Changes
2
2
 
3
+ ### Unreleased
4
+
5
+ ### 2026-07-13 (2.21.1)
6
+
7
+ * Fix a compilation issue on Window and Microsoft Visual C++.
8
+
9
+ ### 2026-07-12 (2.21.0)
10
+
11
+ * `JSON.generate` now accept a `sort_keys` option, which takes either a boolean or a block.
12
+ * Added `#empty?` and `#partial_value?` methods on `JSON::ResumableParser`.
13
+ * Numerous correctness and performance fixes for `JSON::ResumableParser`.
14
+ * Avoid triggering Ruby's `float out of range` warning when parsing out of range numbers.
15
+ * Declare C types with Ruby 4.1 `RUBY_TYPED_THREAD_SAFE_FREE`.
16
+
17
+ ### 2026-06-23 (2.20.0)
18
+
19
+ * Both C and Java parsers are no longer recursive, so parsing very deep documents with `max_nesting: false` will no longer
20
+ result in `SystemStackError stack level too deep` errors.
21
+ * The `:max_nesting` option still defaults to `100`.
22
+ * Optimized floating point number parsing further by replacing the ryu algorithm by a port of Eisel-Lemire Fast Float.
23
+ * Added `JSON::ResumableParser` to parse streams of JSON documents. Not yet available on JRuby.
24
+ * Deprecate default support of JavaScript comments in the parser and add `allow_comments: true` parsing option.
25
+ * Integrate with Ruby 4.1 `ruby_sized_xfree`.
26
+
27
+ ### 2026-06-11 (2.19.9)
28
+
29
+ * Fix buffer overflow that could lead to a crash when writing JSON directly into an IO
30
+ with `JSON.generate(object, io)`. [CVE-2026-54696].
31
+
32
+ ### 2026-06-03 (2.19.8)
33
+
34
+ * Fix 1-byte buffer overread on EOS errors.
35
+ * Handle invalid types passed as `max_nesting` option.
36
+
37
+ ### 2026-05-28 (2.19.7)
38
+
39
+ * Fix some more edge cases with out of range floats.
40
+ * Ensure the string provided to `JSON.parse` can't be mutated during parsing.
41
+ * Add missing write barriers in `State#dup`.
42
+ * Further validate generator `depth` config.
43
+
44
+ ### 2026-05-28 (2.19.6)
45
+
46
+ * Cleanly handle overly large `depth` generator argument.
47
+ * Add missing write barrier in `ParserConfig`.
48
+
49
+ ### 2026-05-04 (2.19.5)
50
+
51
+ * Cap the parser to emit a maximum of 5 deprecation warnings per document. Emitting more is not helpful.
52
+
53
+ ### 2026-04-19 (2.19.4)
54
+
55
+ * Fix parsing of out of range floats (very large exponents that lead to either `0.0` or `Inf`).
56
+
57
+ ### 2026-03-25 (2.19.3)
58
+
59
+ * Fix handling of unescaped control characters preceeded by a backslash.
60
+
61
+ ### 2026-03-18 (2.19.2)
62
+
63
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
64
+
65
+ ### 2026-03-08 (2.19.1)
66
+
67
+ * Fix a compiler dependent GC bug introduced in `2.18.0`.
68
+
69
+ ### 2026-03-06 (2.19.0)
70
+
71
+ * Fix `allow_blank` parsing option to no longer allow invalid types (e.g. `load([], allow_blank: true)` now raise a type error).
72
+ * Add `allow_invalid_escape` parsing option to ignore backslashes that aren't followed by one of the valid escape characters.
73
+
74
+ ### 2026-02-03 (2.18.1)
75
+
76
+ * Fix a potential crash in very specific circumstance if GC triggers during a call to `to_json`
77
+ without first invoking a user defined `#to_json` method.
78
+
79
+ ### 2025-12-11 (2.18.0)
80
+
81
+ * Add `:allow_control_characters` parser options, to allow JSON strings containing unescaped ASCII control characters (e.g. newlines).
82
+
83
+ ### 2026-03-18 (2.17.1.2) - Security Backport
84
+
85
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
86
+
87
+ ### 2025-12-04 (2.17.1)
88
+
89
+ * Fix a regression in parsing of unicode surogate pairs (`\uXX\uXX`) that could cause an invalid string to be returned.
90
+
91
+ ### 2025-12-03 (2.17.0)
92
+
93
+ * Improve `JSON.load` and `JSON.unsafe_load` to allow passing options as second argument.
94
+ * Fix the parser to no longer ignore invalid escapes in strings.
95
+ Only `\"`, `\\`, `\b`, `\f`, `\n`, `\r`, `\t` and `\u` are valid JSON escapes.
96
+ * Fixed `JSON::Coder` to use the depth it was initialized with.
97
+ * On TruffleRuby, fix the generator to not call `to_json` on the return value of `as_json` for `Float::NAN`.
98
+ * Fixed handling of `state.depth`: when `to_json` changes `state.depth` but does not restore it, it is reset
99
+ automatically to its initial value.
100
+ In particular, when a `NestingError` is raised, `depth` is no longer equal to `max_nesting` after the call to
101
+ generate, and is reset to its initial value. Similarly when `to_json` raises an exception.
102
+
103
+ ### 2025-11-07 (2.16.0)
104
+
105
+ * Deprecate `JSON::State#[]` and `JSON::State#[]=`. Consider using `JSON::Coder` instead.
106
+ * `JSON::Coder` now also yields to the block when encountering strings with invalid encoding.
107
+ * Fix GeneratorError messages to be UTF-8 encoded.
108
+ * Fix memory leak when `Exception` is raised, or `throw` is used during JSON generation.
109
+ * Optimized floating point number parsing by integrating the ryu algorithm (thanks to Josef Šimánek).
110
+ * Optimized numbers parsing using SWAR (thanks to Scott Myron).
111
+ * Optimized parsing of pretty printed documents using SWAR (thanks to Scott Myron).
112
+
113
+ ### 2026-03-18 (2.15.2.1) - Security Backport
114
+
115
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
116
+
117
+ ### 2025-10-25 (2.15.2)
118
+
119
+ * Fix `JSON::Coder` to have one dedicated depth counter per invocation.
120
+ After encountering a circular reference in `JSON::Coder#dump`, any further `#dump` call would raise `JSON::NestingError`.
121
+
122
+ ### 2025-10-07 (2.15.1)
123
+
124
+ * Fix incorrect escaping in the JRuby extension when encoding shared strings.
125
+
126
+ ### 2025-09-22 (2.15.0)
127
+
128
+ * `JSON::Coder` callback now receive a second argument to convey whether the object is a hash key.
129
+ * Tuned the floating point number generator to not use scientific notation as aggressively.
130
+
131
+ ### 2025-09-18 (2.14.1)
132
+
133
+ * Fix `IndexOutOfBoundsException` in the JRuby extension when encoding shared strings.
134
+
135
+ ### 2025-09-18 (2.14.0)
136
+
137
+ * Add new `allow_duplicate_key` generator options. By default a warning is now emitted when a duplicated key is encountered.
138
+ In `json 3.0` an error will be raised.
139
+ ```ruby
140
+ >> Warning[:deprecated] = true
141
+ >> puts JSON.generate({ foo: 1, "foo" => 2 })
142
+ (irb):2: warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}.
143
+ This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
144
+ {"foo":1,"foo":2}
145
+ >> JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false)
146
+ detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError)
147
+ ```
148
+ * Fix `JSON.generate` `strict: true` mode to also restrict hash keys.
149
+ * Fix `JSON::Coder` to also invoke block for hash keys that aren't strings nor symbols.
150
+ * Fix `JSON.unsafe_load` usage with proc
151
+ * Fix the parser to more consistently reject invalid UTF-16 surogate pairs.
152
+ * Stop defining `String.json_create`, `String#to_json_raw`, `String#to_json_raw_object` when `json/add` isn't loaded.
153
+
154
+ ### 2025-07-28 (2.13.2)
155
+
156
+ * Improve duplicate key warning and errors to include the key name and point to the right caller.
157
+
158
+ ### 2025-07-24 (2.13.1)
159
+
160
+ * Fix support for older compilers without `__builtin_cpu_supports`.
161
+
162
+ ### 2025-07-17 (2.13.0)
163
+
164
+ * Add new `allow_duplicate_key` parsing options. By default a warning is now emitted when a duplicated key is encountered.
165
+ In `json 3.0` an error will be raised.
166
+ * Optimize parsing further using SIMD to scan strings.
167
+
168
+ ### 2025-05-23 (2.12.2)
169
+
170
+ * Fix compiler optimization level.
171
+
172
+ ### 2025-05-23 (2.12.1)
173
+
174
+ * Fix a potential crash in large negative floating point number generation.
175
+ * Fix for JSON.pretty_generate to use passed state object's generate instead of state class as the required parameters aren't available.
176
+
177
+ ### 2025-05-12 (2.12.0)
178
+
179
+ * Improve floating point generation to not use scientific notation as much.
180
+ * Include line and column in parser errors. Both in the message and as exception attributes.
181
+ * Handle non-string hash keys with broken `to_s` implementations.
182
+ * `JSON.generate` now uses SSE2 (x86) or NEON (arm64) instructions when available to escape strings.
183
+
184
+ ### 2025-04-25 (2.11.3)
185
+
186
+ * Fix a regression in `JSON.pretty_generate` that could cause indentation to be off once some `#to_json` has been called.
187
+
188
+ ### 2025-04-24 (2.11.2)
189
+
190
+ * Add back `JSON::PRETTY_STATE_PROTOTYPE`. This constant was private API but is used by popular gems like `multi_json`.
191
+ It now emits a deprecation warning.
192
+
193
+ ### 2025-04-24 (2.11.1)
194
+
195
+ * Add back `JSON.restore`, `JSON.unparse`, `JSON.fast_unparse` and `JSON.pretty_unparse`.
196
+ These were deprecated 16 years ago, but never emitted warnings, only undocumented, so are
197
+ still used by a few gems.
198
+
199
+ ### 2025-04-24 (2.11.0)
200
+
201
+ * Optimize Integer generation to be ~1.8x faster.
202
+ * Optimize Float generation to be ~10x faster.
203
+ * Fix `JSON.load` proc argument to substitute the parsed object with the return value.
204
+ This better match `Marshal.load` behavior.
205
+ * Deprecate `JSON.fast_generate` (it's not any faster, so pointless).
206
+ * Deprecate `JSON.load_default_options`.
207
+ * Deprecate `JSON.unsafe_load_default_options`.
208
+ * Deprecate `JSON.dump_default_options`.
209
+ * Deprecate `Kernel#j`
210
+ * Deprecate `Kernel#jj`
211
+ * Remove outdated `JSON.iconv`.
212
+ * Remove `Class#json_creatable?` monkey patch.
213
+ * Remove deprecated `JSON.restore` method.
214
+ * Remove deprecated `JSON.unparse` method.
215
+ * Remove deprecated `JSON.fast_unparse` method.
216
+ * Remove deprecated `JSON.pretty_unparse` method.
217
+ * Remove deprecated `JSON::UnparserError` constant.
218
+ * Remove outdated `JSON::MissingUnicodeSupport` constant.
219
+
220
+ ### 2025-03-12 (2.10.2)
221
+
222
+ * Fix a potential crash in the C extension parser.
223
+ * Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until `2.10.0` inadvertently changed it.
224
+ * Ensure document snippets that are included in parser errors don't include truncated multibyte characters.
225
+ * Ensure parser error snippets are valid UTF-8.
226
+ * Fix `JSON::GeneratorError#detailed_message` on Ruby < 3.2
227
+
228
+ ### 2025-02-10 (2.10.1)
229
+
230
+ * Fix a compatibility issue with `MultiJson.dump(obj, pretty: true)`: `no implicit conversion of false into Proc (TypeError)`.
231
+
232
+ ### 2025-02-10 (2.10.0)
233
+
234
+ * `strict: true` now accept symbols as values. Previously they'd only be accepted as hash keys.
235
+ * The C extension Parser has been entirely reimplemented from scratch.
236
+ * Introduced `JSON::Coder` as a new API allowing to customize how non native types are serialized in a non-global way.
237
+ * Introduced `JSON::Fragment` to allow assembling cached fragments in a safe way.
238
+ * The Java implementation of the generator received many optimizations.
239
+
240
+ ### 2024-12-18 (2.9.1)
241
+
242
+ * Fix support for Solaris 10.
243
+
244
+ ### 2024-12-03 (2.9.0)
245
+
246
+ * Fix C implementation of `script_safe` escaping to not confuse some other 3 wide characters with `\u2028` and `\u2029`.
247
+ e.g. `JSON.generate(["倩", "瀨"], script_safe: true)` would generate the wrong JSON.
248
+ * `JSON.dump(object, some_io)` now write into the IO in chunks while previously it would buffer the entire JSON before writing.
249
+ * `JSON::GeneratorError` now has a `#invalid_object` attribute, making it easier to understand why an object tree cannot be serialized.
250
+ * Numerous improvements to the JRuby extension.
251
+
252
+ ### 2024-11-14 (2.8.2)
253
+
254
+ * `JSON.load_file` explicitly read the file as UTF-8.
255
+
256
+ ### 2024-11-06 (2.8.1)
257
+
258
+ * Fix the java packages to include the extension.
259
+
260
+ ### 2024-11-06 (2.8.0)
261
+
262
+ * Emit a deprecation warning when `JSON.load` create custom types without the `create_additions` option being explicitly enabled.
263
+ * Prefer to use `JSON.unsafe_load(string)` or `JSON.load(string, create_additions: true)`.
264
+ * Emit a deprecation warning when serializing valid UTF-8 strings encoded in `ASCII_8BIT` aka `BINARY`.
265
+ * Bump required Ruby version to 2.7.
266
+ * Add support for optionally parsing trailing commas, via `allow_trailing_comma: true`, which in cunjunction with the
267
+ pre-existing support for comments, make it suitable to parse `jsonc` documents.
268
+ * Many performance improvements to `JSON.parse` and `JSON.load`, up to `1.7x` faster on real world documents.
269
+ * Some minor performance improvements to `JSON.dump` and `JSON.generate`.
270
+ * `JSON.pretty_generate` no longer includes newlines inside empty object and arrays.
271
+
272
+ ### 2024-11-04 (2.7.6)
273
+
274
+ * Fix a regression in JSON.generate when dealing with Hash keys that are string subclasses, call `to_json` on them.
275
+
276
+ ### 2024-10-25 (2.7.5)
277
+
278
+ * Fix a memory leak when `#to_json` methods raise an exception.
279
+ * Gracefully handle formatting configs being set to `nil` instead of `""`.
280
+ * Workaround another issue caused by conflicting versions of both `json_pure` and `json` being loaded.
281
+
282
+ ### 2024-10-25 (2.7.4)
283
+
284
+ * Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
285
+ This bug would cause some gems with native extension to fail during compilation.
286
+ * Workaround different versions of `json` and `json_pure` being loaded (not officially supported).
287
+ * Make `json_pure` Ractor compatible.
288
+
289
+ ### 2024-10-24 (2.7.3)
290
+
291
+ * Numerous performance optimizations in `JSON.generate` and `JSON.dump` (up to 2 times faster).
292
+ * Limit the size of ParserError exception messages, only include up to 32 bytes of the unparsable source.
293
+ * Fix json-pure's `Object#to_json` to accept non-state arguments.
294
+ * Fix multiline comment support in `json-pure`.
295
+ * Fix `JSON.parse` to no longer mutate the argument encoding when passed an ASCII-8BIT string.
296
+ * Fix `String#to_json` to raise on invalid encoding in `json-pure`.
297
+ * Delete code that was based on CVTUTF.
298
+ * Use the pure-Ruby generator on TruffleRuby.
299
+ * Fix `strict` mode in `json-pure` to not break on Integer.
300
+
301
+ ### 2024-04-04 (2.7.2)
302
+
303
+ * Use rb_sym2str instead of SYM2ID #561
304
+ * Fix memory leak when exception is raised during JSON generation #574
305
+ * Remove references to "19" methods in JRuby #576
306
+ * Make OpenStruct support as optional by @hsbt in #565
307
+ * Autoload JSON::GenericObject to avoid require ostruct warning in Ruby 3.4 #577
308
+ * Warn to install ostruct if json couldn't load it by @hsbt #578
309
+
310
+ ### 2023-12-05 (2.7.1)
311
+
312
+ * JSON.dump: handle unenclosed hashes regression #554
313
+ * Overload kwargs in JSON.dump #556
314
+ * [DOC] RDoc for additions #557
315
+ * Fix JSON.dump overload combination #558
316
+
317
+ ### 2023-12-01 (2.7.0)
318
+
319
+ * Add a strict option to Generator #519
320
+ * `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
321
+ * Remove unnecessary initialization of create_id in JSON.parse() #454
322
+ * Improvements to Hash#to_json in pure implementation generator #203
323
+ * Use ruby_xfree to free buffers #518
324
+ * Fix "unexpected token" offset for Infinity #507
325
+ * Avoid using deprecated BigDecimal.new on JRuby #546
326
+ * Removed code for Ruby 1.8 #540
327
+ * Rename JSON::ParseError to JSON:ParserError #530
328
+ * Call super in included hook #486
329
+ * JRuby requires a minimum of Java 8 #516
330
+ * Always indent even if empty #517
331
+
332
+ ### 2022-11-30 (2.6.3)
333
+
334
+ * bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError #483
335
+ * Stop including the parser source __LINE__ in exceptions #470
336
+
337
+ ### 2022-11-17 (2.6.2)
338
+
339
+ * Remove unknown keyword arg from DateTime.parse #488
340
+ * Ignore java artifacts by @hsbt #489
341
+ * Fix parser bug for empty string allocation #496
342
+
3
343
  ### 2021-10-24 (2.6.1)
4
344
 
5
345
  * Restore version.rb with 2.6.1
@@ -95,6 +435,7 @@
95
435
  ## 2015-09-11 (2.0.0)
96
436
  * Now complies to newest JSON RFC 7159.
97
437
  * Implements compatibility to ruby 2.4 integer unification.
438
+ * Removed support for `quirks_mode` option.
98
439
  * Drops support for old rubies whose life has ended, that is rubies < 2.0.
99
440
  Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
100
441
  * There were still some mentions of dual GPL licensing in the source, but JSON
@@ -105,6 +446,19 @@
105
446
  I changed these mentions to be consistent with the Ruby license setting in
106
447
  the gemspec files which were already correct now.
107
448
 
449
+ ## 2017-01-13 (1.8.6)
450
+ * Be compatible with ancient ruby 1.8 (maybe?)
451
+
452
+ ## 2015-09-11 (1.8.5)
453
+ * Be compatible with ruby 2.4.0
454
+ * There were still some mentions of dual GPL licensing in the source, but JSON
455
+ has just the Ruby license that itself includes an explicit dual-licensing
456
+ clause that allows covered software to be distributed under the terms of
457
+ the Simplified BSD License instead for all ruby versions >= 1.9.3. This is
458
+ however a GPL compatible license according to the Free Software Foundation.
459
+ I changed these mentions to be consistent with the Ruby license setting in
460
+ the gemspec files which were already correct now.
461
+
108
462
  ## 2015-06-01 (1.8.3)
109
463
  * Fix potential memory leak, thx to nobu.
110
464
 
@@ -122,7 +476,7 @@
122
476
  * Remove Rubinius exception since transcoding should be working now.
123
477
 
124
478
  ## 2013-05-13 (1.8.0)
125
- * Fix https://github.com/flori/json/issues/162 reported by Marc-Andre
479
+ * Fix https://github.com/ruby/json/issues/162 reported by Marc-Andre
126
480
  Lafortune <github_rocks@marc-andre.ca>. Thanks!
127
481
  * Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with
128
482
  -Wchar-subscripts and better validate UTF-8 strings.
@@ -142,7 +496,7 @@
142
496
  JSON::GenericObject.json_creatable = true
143
497
  as well.
144
498
  * Remove useless assert in fbuffer implementation.
145
- * Apply patch attached to https://github.com/flori/json/issues#issue/155
499
+ * Apply patch attached to https://github.com/ruby/json/issues#issue/155
146
500
  provided by John Shahid <jvshahid@gmail.com>, Thx!
147
501
  * Add license information to rubygems spec data, reported by Jordi Massaguer Pla <jmassaguerpla@suse.de>.
148
502
  * Improve documentation, thx to Zachary Scott <zachary@zacharyscott.net>.
@@ -156,7 +510,7 @@
156
510
  * Fix compilation of extension on older rubies.
157
511
 
158
512
  ## 2012-07-26 (1.7.4)
159
- * Fix compilation problem on AIX, see https://github.com/flori/json/issues/142
513
+ * Fix compilation problem on AIX, see https://github.com/ruby/json/issues/142
160
514
 
161
515
  ## 2012-05-12 (1.7.3)
162
516
  * Work around Rubinius encoding issues using iconv for conversion instead.
@@ -178,9 +532,9 @@
178
532
  * Propagate src encoding to values made from it (fixes 1.9 mode converting
179
533
  everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo
180
534
  <tom.enebo@gmail.com>), should fix
181
- https://github.com/flori/json/issues#issue/119.
182
- * Fix https://github.com/flori/json/issues#issue/124 Thx to Jason Hutchens.
183
- * Fix https://github.com/flori/json/issues#issue/117
535
+ https://github.com/ruby/json/issues#issue/119.
536
+ * Fix https://github.com/ruby/json/issues#issue/124 Thx to Jason Hutchens.
537
+ * Fix https://github.com/ruby/json/issues#issue/117
184
538
 
185
539
  ## 2012-01-15 (1.6.5)
186
540
  * Vit Ondruch <v.ondruch@tiscali.cz> reported a bug that shows up when using
@@ -207,7 +561,7 @@
207
561
  patch go to Josh Partlow (jpartlow@github).
208
562
  * Improve parsing speed for JSON numbers (integers and floats) in a similar way to
209
563
  what Evan Phoenix <evan@phx.io> suggested in:
210
- https://github.com/flori/json/pull/103
564
+ https://github.com/ruby/json/pull/103
211
565
 
212
566
  ## 2011-09-18 (1.6.1)
213
567
  * Using -target 1.5 to force Java bits to compile with 1.5.
@@ -220,15 +574,14 @@
220
574
  * Fix memory leak when used from multiple JRuby. (Patch by
221
575
  jfirebaugh@github).
222
576
  * Apply patch by Eric Wong <nocode@yhbt.net> that fixes garbage collection problem
223
- reported in https://github.com/flori/json/issues/46.
577
+ reported in https://github.com/ruby/json/issues/46.
224
578
  * Add :quirks_mode option to parser and generator.
225
579
  * Add support for Rational and Complex number additions via json/add/complex
226
580
  and json/add/rational requires.
227
581
 
228
582
  ## 2011-06-20 (1.5.3)
229
583
  * Alias State#configure method as State#merge to increase duck type synonymy with Hash.
230
- * Add `as_json` methods in json/add/core, so rails can create its json objects
231
- the new way.
584
+ * Add `as_json` methods in json/add/core, so rails can create its json objects the new way.
232
585
 
233
586
  ## 2011-05-11 (1.5.2)
234
587
  * Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
@@ -239,7 +592,7 @@
239
592
 
240
593
  ## 2011-01-24 (1.5.1)
241
594
  * Made rake-compiler build a fat binary gem. This should fix issue
242
- https://github.com/flori/json/issues#issue/54.
595
+ https://github.com/ruby/json/issues#issue/54.
243
596
 
244
597
  ## 2011-01-22 (1.5.0)
245
598
  * Included Java source codes for the Jruby extension made by Daniel Luz
@@ -249,7 +602,7 @@
249
602
  reported by Riley Goodside.
250
603
 
251
604
  ## 2010-08-09 (1.4.6)
252
- * Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23,
605
+ * Fixed oversight reported in http://github.com/ruby/json/issues/closed#issue/23,
253
606
  always create a new object from the state prototype.
254
607
  * Made pure and ext api more similar again.
255
608
 
@@ -259,12 +612,12 @@
259
612
  argument.
260
613
  * Some fixes in the state objects and additional tests.
261
614
  ## 2010-08-06 (1.4.4)
262
- * Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25
263
- * Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and
264
- http://github.com/flori/json/issues/closed#issue/23
615
+ * Fixes build problem for rubinius under OS X, http://github.com/ruby/json/issues/closed#issue/25
616
+ * Fixes crashes described in http://github.com/ruby/json/issues/closed#issue/21 and
617
+ http://github.com/ruby/json/issues/closed#issue/23
265
618
  ## 2010-05-05 (1.4.3)
266
619
  * Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
267
- * Fixed issue http://github.com/flori/json/issues/#issue/20 reported by
620
+ * Fixed issue http://github.com/ruby/json/issues/#issue/20 reported by
268
621
  electronicwhisper@github. Thx!
269
622
 
270
623
  ## 2010-04-26 (1.4.2)
@@ -286,7 +639,7 @@
286
639
  * Extension should at least be compatible with MRI, YARV and Rubinius.
287
640
 
288
641
  ## 2010-04-07 (1.2.4)
289
- * Triger const_missing callback to make Rails' dynamic class loading work.
642
+ * Trigger const_missing callback to make Rails' dynamic class loading work.
290
643
 
291
644
  ## 2010-03-11 (1.2.3)
292
645
  * Added a `State#[]` method which returns an attribute's value in order to
data/LEGAL ADDED
@@ -0,0 +1,20 @@
1
+ # -*- rdoc -*-
2
+
3
+ = LEGAL NOTICE INFORMATION
4
+ --------------------------
5
+
6
+ All the files in this distribution are covered under either the Ruby's
7
+ license (see the file COPYING) or public-domain except some files
8
+ mentioned below.
9
+
10
+ ext/json/ext/vendor/fpconv.h::
11
+ This file is adapted from https://github.com/night-shift/fpconv
12
+ It is licensed under Boost Software License 1.0.
13
+
14
+ ext/json/ext/vendor/jeaiii-ltoa.h::
15
+ This file is adapted from https://github.com/jeaiii/itoa
16
+ It is licensed under the MIT License
17
+
18
+ ext/json/ext/vendor/fast_float_parser.h::
19
+ This file is adapted from the Fast Float C++ library by The fast_float authors https://github.com/fastfloat/fast_float
20
+ It is licensed under the MIT License