json 2.19.9-java → 2.20.0-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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f868e8b079bbfd0c07f55ec36c9d2ce852e63bab1b5095053744297e25cff251
4
- data.tar.gz: 0c91a99e820eb62b0efddd05bd400af34139123d61852504884472080d635d1e
3
+ metadata.gz: f01681908b8ed67cdfbfb53e8f7a580259cd6c5ea973217292233aee473a2bcb
4
+ data.tar.gz: 6cb81cbffd79eeff08ad709da839556c18492423a8980c50cd79c72a3720b022
5
5
  SHA512:
6
- metadata.gz: 7f8d242f8dd44d94b1975f22c8684962d85608da1a660632792b40a32675e16588ed8ac21b16caba7a0822bb1015e2a2b54d524199cc8fb43ae455329c0fef97
7
- data.tar.gz: 9a9ecc0b75fbdd1bc1b579d0913737d49a0abbd87ceb9ebbc26af1f15d0e8053e76cfbe735d44828b1caff4a765172cfdabcd4cbd1846d7563beab8ec3f4a00a
6
+ metadata.gz: 32142742b1ccfe813374514fa2e51fbe99280ec08f67b611177c10c2bee032e6ec5725e1ee826f7a0ff484ab33e0fa40c40ee28240cbda11619ddb4127f6d748
7
+ data.tar.gz: d33bdd91bc38c61a82bcadc58bd8b4a085d77943945d31d5ff1f1de14d01a42a7fe7c2088c9fea76c3e10b00ee24cfe89ccafd3df9eace5d2e7f761dd007ebac
data/CHANGES.md CHANGED
@@ -2,10 +2,20 @@
2
2
 
3
3
  ### Unreleased
4
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
+
5
15
  ### 2026-06-11 (2.19.9)
6
16
 
7
17
  * Fix buffer overflow that could lead to a crash when writing JSON directly into an IO
8
- with `JSON.generate(object, io)`. [CVE-PENDING].
18
+ with `JSON.generate(object, io)`. [CVE-2026-54696].
9
19
 
10
20
  ### 2026-06-03 (2.19.8)
11
21
 
data/LEGAL CHANGED
@@ -15,6 +15,6 @@ ext/json/ext/vendor/jeaiii-ltoa.h::
15
15
  This file is adapted from https://github.com/jeaiii/itoa
16
16
  It is licensed under the MIT License
17
17
 
18
- ext/json/ext/vendor/ryu.h::
19
- This file is adapted from the Ryu algorithm by Ulf Adams https://github.com/ulfjack/ryu.
20
- It is dual-licensed under Apache License 2.0 OR Boost Software License 1.0.
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
data/README.md CHANGED
@@ -306,5 +306,3 @@ The latest version of this library can be downloaded at
306
306
  Online Documentation should be located at
307
307
 
308
308
  * https://www.rubydoc.info/gems/json
309
-
310
- [Ragel]: http://www.colm.net/open-source/ragel/
Binary file
Binary file
data/lib/json/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSON
4
- VERSION = '2.19.9'
4
+ VERSION = '2.20.0'
5
5
  end
data/lib/json.rb CHANGED
@@ -145,11 +145,11 @@ require 'json/common'
145
145
  # # warning: detected duplicate keys in JSON object.
146
146
  # # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
147
147
  #
148
- # When set to `+true+`
148
+ # When set to +true+:
149
149
  # # The last value is used.
150
150
  # JSON.parse('{"a": 1, "a":2}') => {"a" => 2}
151
151
  #
152
- # When set to `+false+`, the future default:
152
+ # When set to +false+, the future default:
153
153
  # JSON.parse('{"a": 1, "a":2}') => duplicate key at line 1 column 1 (JSON::ParserError)
154
154
  #
155
155
  # ---
@@ -184,6 +184,20 @@ require 'json/common'
184
184
  #
185
185
  # ---
186
186
  #
187
+ # Option +allow_comments+ (boolean) specifies whether to allow
188
+ # JavaScript style comments (either <tt>// comment</tt> or <tt>/* comment */</tt>);
189
+ # defaults to +false+.
190
+ #
191
+ # When not specified, a deprecation warning is emitted if a comment is encountered.
192
+ #
193
+ # When set to +true+, comments are ignored:
194
+ # JSON.parse('/* comment */ {"a": 1, "a":2}') # => {"a" => 2}
195
+ #
196
+ # When set to +false+, the future default:
197
+ # JSON.parse('/* comment */ {"a": 1, "a":2}') # unexpected character: '/' at line 1 column 1 (JSON::ParserError)
198
+ #
199
+ # ---
200
+ #
187
201
  # Option +allow_control_characters+ (boolean) specifies whether to allow
188
202
  # unescaped ASCII control characters, such as newlines, in strings;
189
203
  # defaults to +false+.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.9
4
+ version: 2.20.0
5
5
  platform: java
6
6
  authors:
7
7
  - Daniel Luz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-06-11 00:00:00.000000000 Z
10
+ date: 2026-06-23 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: A JSON implementation as a JRuby extension.
13
13
  email: dev+ruby@mernen.com