json 2.18.0-java → 2.18.2-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: 01703c1e2adcabaf3a125765317390a3316605491b546b07e28e9b96514a3115
4
- data.tar.gz: 88f16279231338f9c361f60f0714444c95464b68eb2cdfbf386a79c249fbaf15
3
+ metadata.gz: 817a2f4bdfeaca6822638f570c4a485cbb14f632c4a93c38268e2941f4ce7cf8
4
+ data.tar.gz: db0aa08b2b7f511f953a2da20c3e95afc1a0c80bd31de6bd55da43df8d7f8720
5
5
  SHA512:
6
- metadata.gz: e7be2f57299fc2951a1b9db08524ceba095a0a01d7d277b7bde247dc744d5084b59fc104f2a2774a6e189b6294ce1839cd4eab0a741c4aae4b8f2a5721a8b199
7
- data.tar.gz: d77c19ed8e1ab52b27374acdc4f23357faad3ce3151663accc4c70d68fc65e8e207396f23a61a8fbd722c7bdf62118644f234e3e2f4effc75e62c6dcdc4a00f3
6
+ metadata.gz: a9c891a107a4f6a61c1a24198f0bd3f7b1dff8e0f302071f28319ec0c546463525da884bf8d8ca360b769d17f208c405649de2d41bcf67e7f8b1fb866c7ea393
7
+ data.tar.gz: c412298860ece34252ea1bcaadb5d1d28c8a977c1bf9a691f69df3d897a91b153780bde5e752ab59db5d8a4378eed172cca51cca240c0316919c32abe5158a1d
data/CHANGES.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ ### 2026-11-02 (2.18.2)
6
+
7
+ * Backport handling of unescaped control characters preceeded by a backslash from 2.19.3.
8
+ GHSA-cjpr-jw2g-fw99.
9
+
10
+ ### 2026-02-03 (2.18.1)
11
+
12
+ * Fix a potential crash in very specific circumstance if GC triggers during a call to `to_json`
13
+ without first invoking a user defined `#to_json` method.
14
+
5
15
  ### 2025-12-11 (2.18.0)
6
16
 
7
17
  * Add `:allow_control_characters` parser options, to allow JSON strings containing unescaped ASCII control characters (e.g. newlines).
@@ -66,7 +76,7 @@
66
76
  * Fix `JSON.generate` `strict: true` mode to also restrict hash keys.
67
77
  * Fix `JSON::Coder` to also invoke block for hash keys that aren't strings nor symbols.
68
78
  * Fix `JSON.unsafe_load` usage with proc
69
- * Fix the parser to more consistently reject invalid UTF-16 surogate pairs.
79
+ * Fix the parser to more consistently reject invalid UTF-16 surogate pairs.
70
80
  * Stop defining `String.json_create`, `String#to_json_raw`, `String#to_json_raw_object` when `json/add` isn't loaded.
71
81
 
72
82
  ### 2025-07-28 (2.13.2)
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.18.0'
4
+ VERSION = '2.18.2'
5
5
  end
data/lib/json.rb CHANGED
@@ -6,6 +6,15 @@ require 'json/common'
6
6
  #
7
7
  # \JSON is a lightweight data-interchange format.
8
8
  #
9
+ # \JSON is easy for us humans to read and write,
10
+ # and equally simple for machines to read (parse) and write (generate).
11
+ #
12
+ # \JSON is language-independent, making it an ideal interchange format
13
+ # for applications in differing programming languages
14
+ # and on differing operating systems.
15
+ #
16
+ # == \JSON Values
17
+ #
9
18
  # A \JSON value is one of the following:
10
19
  # - Double-quoted text: <tt>"foo"</tt>.
11
20
  # - Number: +1+, +1.0+, +2.0e2+.
@@ -173,6 +182,18 @@ require 'json/common'
173
182
  # When enabled:
174
183
  # JSON.parse('[1,]', allow_trailing_comma: true) # => [1]
175
184
  #
185
+ # ---
186
+ #
187
+ # Option +allow_control_characters+ (boolean) specifies whether to allow
188
+ # unescaped ASCII control characters, such as newlines, in strings;
189
+ # defaults to +false+.
190
+ #
191
+ # With the default, +false+:
192
+ # JSON.parse(%{"Hello\nWorld"}) # invalid ASCII control character in string (JSON::ParserError)
193
+ #
194
+ # When enabled:
195
+ # JSON.parse(%{"Hello\nWorld"}, allow_control_characters: true) # => "Hello\nWorld"
196
+ #
176
197
  # ====== Output Options
177
198
  #
178
199
  # Option +freeze+ (boolean) specifies whether the returned objects will be frozen;
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.18.0
4
+ version: 2.18.2
5
5
  platform: java
6
6
  authors:
7
7
  - Daniel Luz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-12-11 00:00:00.000000000 Z
10
+ date: 2026-11-02 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