Skip to content

Update dependency json to v2.21.2 - #230

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/json-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/json-2.x

Conversation

@renovate

@renovate renovate Bot commented Jan 16, 2026 •

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
json (changelog) '= 2.6.3' → '= 2.21.2' age confidence
json (changelog) '= 2.6.1' → '= 2.21.2' age confidence
json (changelog) '= 2.5.1' → '= 2.21.2' age confidence
json (changelog) '= 2.3.0' → '= 2.21.2' age confidence
json (changelog) '= 2.1.0' → '= 2.21.2' age confidence

Release Notes

ruby/json (json)

v2.21.2

Compare Source

v2.21.1

Compare Source

  • Fix a compilation issue on Window and Microsoft Visual C++.

v2.21.0

Compare Source

  • JSON.generate now accept a sort_keys option, which takes either a boolean or a block.
  • Added #empty? and #partial_value? methods on JSON::ResumableParser.
  • Numerous correctness and performance fixes for JSON::ResumableParser.
  • Avoid triggering Ruby's float out of range warning when parsing out of range numbers.
  • Declare C types with Ruby 4.1 RUBY_TYPED_THREAD_SAFE_FREE.

v2.20.0

Compare Source

  • Both C and Java parsers are no longer recursive, so parsing very deep documents with max_nesting: false will no longer
    result in SystemStackError stack level too deep errors.
    • The :max_nesting option still defaults to 100.
  • Optimized floating point number parsing further by replacing the ryu algorithm by a port of Eisel-Lemire Fast Float.
  • Added JSON::ResumableParser to parse streams of JSON documents. Not yet available on JRuby.
  • Deprecate default support of JavaScript comments in the parser and add allow_comments: true parsing option.
  • Integrate with Ruby 4.1 ruby_sized_xfree.

v2.19.9

Compare Source

  • Fix buffer overflow that could lead to a crash when writing JSON directly into an IO
    with JSON.generate(object, io). [CVE-2026-54696].

v2.19.8

Compare Source

  • Fix 1-byte buffer overread on EOS errors.
  • Handle invalid types passed as max_nesting option.

v2.19.7

Compare Source

  • Fix some more edge cases with out of range floats.
  • Ensure the string provided to JSON.parse can't be mutated during parsing.
  • Add missing write barriers in State#dup.
  • Further validate generator depth config.

v2.19.6

Compare Source

  • Cleanly handle overly large depth generator argument.
  • Add missing write barrier in ParserConfig.

v2.19.5

Compare Source

  • Cap the parser to emit a maximum of 5 deprecation warnings per document. Emitting more is not helpful.

v2.19.4

Compare Source

  • Fix parsing of out of range floats (very large exponents that lead to either 0.0 or Inf).

v2.19.3

Compare Source

  • Fix handling of unescaped control characters preceeded by a backslash.

v2.19.2

Compare Source

  • Fix a format string injection vulnerability in JSON.parse(doc, allow_duplicate_key: false). CVE-2026-33210.

v2.19.1

Compare Source

  • Fix a compiler dependent GC bug introduced in 2.18.0.

v2.19.0

Compare Source

  • Fix allow_blank parsing option to no longer allow invalid types (e.g. load([], allow_blank: true) now raise a type error).
  • Add allow_invalid_escape parsing option to ignore backslashes that aren't followed by one of the valid escape characters.

v2.18.5

Compare Source

  • Backport fix for heap overflow when writing JSON directly into an IO (JSON.generate(object, io)).
    CVE-2026-54696. Backported from 2.19.9.

v2.18.4

Compare Source

  • Broken release.

v2.18.3

Compare Source

v2.18.2

Compare Source

  • Backport handling of unescaped control characters preceeded by a backslash from 2.19.3.
    GHSA-cjpr-jw2g-fw99.

v2.18.1

Compare Source

  • Fix a potential crash in very specific circumstance if GC triggers during a call to to_json
    without first invoking a user defined #to_json method.

v2.18.0

Compare Source

  • Add :allow_control_characters parser options, to allow JSON strings containing unescaped ASCII control characters (e.g. newlines).

v2.17.1.2

Compare Source

  • Fix a format string injection vulnerability in JSON.parse(doc, allow_duplicate_key: false). CVE-2026-33210.

v2.17.1

Compare Source

  • Fix a format string injection vulnerability in JSON.parse(doc, allow_duplicate_key: false). CVE-2026-33210.

v2.17.0

Compare Source

  • Improve JSON.load and JSON.unsafe_load to allow passing options as second argument.
  • Fix the parser to no longer ignore invalid escapes in strings.
    Only \", \\, \b, \f, \n, \r, \t and \u are valid JSON escapes.
  • Fixed JSON::Coder to use the depth it was initialized with.
  • On TruffleRuby, fix the generator to not call to_json on the return value of as_json for Float::NAN.
  • Fixed handling of state.depth: when to_json changes state.depth but does not restore it, it is reset
    automatically to its initial value.
    In particular, when a NestingError is raised, depth is no longer equal to max_nesting after the call to
    generate, and is reset to its initial value. Similarly when to_json raises an exception.

v2.16.0

Compare Source

  • Deprecate JSON::State#[] and JSON::State#[]=. Consider using JSON::Coder instead.
  • JSON::Coder now also yields to the block when encountering strings with invalid encoding.
  • Fix GeneratorError messages to be UTF-8 encoded.
  • Fix memory leak when Exception is raised, or throw is used during JSON generation.
  • Optimized floating point number parsing by integrating the ryu algorithm (thanks to Josef Šimánek).
  • Optimized numbers parsing using SWAR (thanks to Scott Myron).
  • Optimized parsing of pretty printed documents using SWAR (thanks to Scott Myron).

v2.15.2.1

Compare Source

  • Fix a format string injection vulnerability in JSON.parse(doc, allow_duplicate_key: false). CVE-2026-33210.

v2.15.2

Compare Source

  • Fix a format string injection vulnerability in JSON.parse(doc, allow_duplicate_key: false). CVE-2026-33210.

v2.15.1

Compare Source

  • Fix incorrect escaping in the JRuby extension when encoding shared strings.

v2.15.0

Compare Source

  • JSON::Coder callback now receive a second argument to convey whether the object is a hash key.
  • Tuned the floating point number generator to not use scientific notation as aggressively.

v2.14.1

Compare Source

  • Fix IndexOutOfBoundsException in the JRuby extension when encoding shared strings.

v2.14.0

Compare Source

  • Add new allow_duplicate_key generator options. By default a warning is now emitted when a duplicated key is encountered.
    In json 3.0 an error will be raised.
    >> Warning[:deprecated] = true
    >> puts JSON.generate({ foo: 1, "foo" => 2 })
    (irb):2: warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}.
    This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
    {"foo":1,"foo":2}
    >> JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false)
    detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError)
  • Fix JSON.generate strict: true mode to also restrict hash keys.
  • Fix JSON::Coder to also invoke block for hash keys that aren't strings nor symbols.
  • Fix JSON.unsafe_load usage with proc
  • Fix the parser to more consistently reject invalid UTF-16 surogate pairs.
  • Stop defining String.json_create, String#to_json_raw, String#to_json_raw_object when json/add isn't loaded.

v2.13.2

Compare Source

  • Improve duplicate key warning and errors to include the key name and point to the right caller.

v2.13.1

Compare Source

  • Fix support for older compilers without __builtin_cpu_supports.

v2.13.0

Compare Source

  • Add new allow_duplicate_key parsing options. By default a warning is now emitted when a duplicated key is encountered.
    In json 3.0 an error will be raised.
  • Optimize parsing further using SIMD to scan strings.

v2.12.2

Compare Source

  • Fix compiler optimization level.

v2.12.1

Compare Source

  • Fix a potential crash in large negative floating point number generation.
  • Fix for JSON.pretty_generate to use passed state object's generate instead of state class as the required parameters aren't available.

v2.12.0

Compare Source

  • Improve floating point generation to not use scientific notation as much.
  • Include line and column in parser errors. Both in the message and as exception attributes.
  • Handle non-string hash keys with broken to_s implementations.
  • JSON.generate now uses SSE2 (x86) or NEON (arm64) instructions when available to escape strings.

v2.11.3

Compare Source

  • Fix a regression in JSON.pretty_generate that could cause indentation to be off once some #to_json has been called.

v2.11.2

Compare Source

  • Add back JSON::PRETTY_STATE_PROTOTYPE. This constant was private API but is used by popular gems like multi_json.
    It now emits a deprecation warning.

v2.11.1

Compare Source

  • Add back JSON.restore, JSON.unparse, JSON.fast_unparse and JSON.pretty_unparse.
    These were deprecated 16 years ago, but never emitted warnings, only undocumented, so are
    still used by a few gems.

v2.11.0

Compare Source

  • Optimize Integer generation to be ~1.8x faster.
  • Optimize Float generation to be ~10x faster.
  • Fix JSON.load proc argument to substitute the parsed object with the return value.
    This better match Marshal.load behavior.
  • Deprecate JSON.fast_generate (it's not any faster, so pointless).
  • Deprecate JSON.load_default_options.
  • Deprecate JSON.unsafe_load_default_options.
  • Deprecate JSON.dump_default_options.
  • Deprecate Kernel#j
  • Deprecate Kernel#jj
  • Remove outdated JSON.iconv.
  • Remove Class#json_creatable? monkey patch.
  • Remove deprecated JSON.restore method.
  • Remove deprecated JSON.unparse method.
  • Remove deprecated JSON.fast_unparse method.
  • Remove deprecated JSON.pretty_unparse method.
  • Remove deprecated JSON::UnparserError constant.
  • Remove outdated JSON::MissingUnicodeSupport constant.

v2.10.2

Compare Source

  • Fix a potential crash in the C extension parser.
  • Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until 2.10.0 inadvertently changed it.
  • Ensure document snippets that are included in parser errors don't include truncated multibyte characters.
  • Ensure parser error snippets are valid UTF-8.
  • Fix JSON::GeneratorError#detailed_message on Ruby < 3.2

v2.10.1

Compare Source

  • Fix a compatibility issue with MultiJson.dump(obj, pretty: true): no implicit conversion of false into Proc (TypeError).

v2.10.0

Compare Source

  • strict: true now accept symbols as values. Previously they'd only be accepted as hash keys.
  • The C extension Parser has been entirely reimplemented from scratch.
  • Introduced JSON::Coder as a new API allowing to customize how non native types are serialized in a non-global way.
  • Introduced JSON::Fragment to allow assembling cached fragments in a safe way.
  • The Java implementation of the generator received many optimizations.

v2.9.1

Compare Source

  • Fix support for Solaris 10.

v2.9.0

Compare Source

  • Fix C implementation of script_safe escaping to not confuse some other 3 wide characters with \u2028 and \u2029.
    e.g. JSON.generate(["倩", "瀨"], script_safe: true) would generate the wrong JSON.
  • JSON.dump(object, some_io) now write into the IO in chunks while previously it would buffer the entire JSON before writing.
  • JSON::GeneratorError now has a #invalid_object attribute, making it easier to understand why an object tree cannot be serialized.
  • Numerous improvements to the JRuby extension.

v2.8.2

Compare Source

  • JSON.load_file explicitly read the file as UTF-8.

v2.8.1

Compare Source

  • Fix the java packages to include the extension.

v2.8.0

Compare Source

  • Emit a deprecation warning when JSON.load create custom types without the create_additions option being explicitly enabled.
    • Prefer to use JSON.unsafe_load(string) or JSON.load(string, create_additions: true).
  • Emit a deprecation warning when serializing valid UTF-8 strings encoded in ASCII_8BIT aka BINARY.
  • Bump required Ruby version to 2.7.
  • Add support for optionally parsing trailing commas, via allow_trailing_comma: true, which in cunjunction with the
    pre-existing support for comments, make it suitable to parse jsonc documents.
  • Many performance improvements to JSON.parse and JSON.load, up to 1.7x faster on real world documents.
  • Some minor performance improvements to JSON.dump and JSON.generate.
  • JSON.pretty_generate no longer includes newlines inside empty object and arrays.

v2.7.6

Compare Source

  • Fix a regression in JSON.generate when dealing with Hash keys that are string subclasses, call to_json on them.

v2.7.5

Compare Source

  • Fix a memory leak when #to_json methods raise an exception.
  • Gracefully handle formatting configs being set to nil instead of "".
  • Workaround another issue caused by conflicting versions of both json_pure and json being loaded.

v2.7.4

Compare Source

  • Workaround a bug in 3.4.8 and older rubygems/rubygems#6490.
    This bug would cause some gems with native extension to fail during compilation.
  • Workaround different versions of json and json_pure being loaded (not officially supported).
  • Make json_pure Ractor compatible.

v2.7.3

Compare Source

  • Numerous performance optimizations in JSON.generate and JSON.dump (up to 2 times faster).
  • Limit the size of ParserError exception messages, only include up to 32 bytes of the unparsable source.
  • Fix json-pure's Object#to_json to accept non-state arguments.
  • Fix multiline comment support in json-pure.
  • Fix JSON.parse to no longer mutate the argument encoding when passed an ASCII-8BIT string.
  • Fix String#to_json to raise on invalid encoding in json-pure.
  • Delete code that was based on CVTUTF.
  • Use the pure-Ruby generator on TruffleRuby.
  • Fix strict mode in json-pure to not break on Integer.

v2.7.2

Compare Source

  • Use rb_sym2str instead of SYM2ID #​561
  • Fix memory leak when exception is raised during JSON generation #​574
  • Remove references to "19" methods in JRuby #​576
  • Make OpenStruct support as optional by @​hsbt in #​565
  • Autoload JSON::GenericObject to avoid require ostruct warning in Ruby 3.4 #​577
  • Warn to install ostruct if json couldn't load it by @​hsbt #​578

v2.7.1

Compare Source

  • JSON.dump: handle unenclosed hashes regression #​554
  • Overload kwargs in JSON.dump #​556
  • [DOC] RDoc for additions #​557
  • Fix JSON.dump overload combination #​558

v2.7.0

Compare Source

  • Add a strict option to Generator #​519
  • 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
  • Remove unnecessary initialization of create_id in JSON.parse() #​454
  • Improvements to Hash#to_json in pure implementation generator #​203
  • Use ruby_xfree to free buffers #​518
  • Fix "unexpected token" offset for Infinity #​507
  • Avoid using deprecated BigDecimal.new on JRuby #​546
  • Removed code for Ruby 1.8 #​540
  • Rename JSON::ParseError to JSON:ParserError #​530
  • Call super in included hook #​486
  • JRuby requires a minimum of Java 8 #​516
  • Always indent even if empty #​517

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 306b582 to 23253d3 Compare February 3, 2026 07:32
@renovate renovate Bot changed the title Update dependency json to v2.18.0 Update dependency json to v2.18.1 Feb 4, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 23253d3 to c434693 Compare February 4, 2026 04:09
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from c434693 to 2936d7b Compare February 12, 2026 21:43
@renovate renovate Bot changed the title Update dependency json to v2.18.1 Update dependency json to v2.19.0 Mar 6, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 2936d7b to a41c9be Compare March 6, 2026 21:45
@renovate renovate Bot changed the title Update dependency json to v2.19.0 Update dependency json to v2.19.1 Mar 8, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from a41c9be to 92183cc Compare March 8, 2026 10:56
@renovate renovate Bot changed the title Update dependency json to v2.19.1 Update dependency json to v2.19.2 Mar 18, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 92183cc to 31ae977 Compare March 18, 2026 19:31
@renovate renovate Bot changed the title Update dependency json to v2.19.2 Update dependency json to v2.19.3 Mar 31, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 31ae977 to 2efc101 Compare March 31, 2026 09:52
@renovate renovate Bot changed the title Update dependency json to v2.19.3 Update dependency json to v2.19.4 Apr 19, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 2efc101 to 3cf90dd Compare April 19, 2026 03:40
@renovate renovate Bot changed the title Update dependency json to v2.19.4 Update dependency json to v2.19.5 May 5, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 3cf90dd to 0cb5cd9 Compare May 5, 2026 04:02
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 0cb5cd9 to a049dbf Compare May 21, 2026 08:10
@renovate renovate Bot changed the title Update dependency json to v2.19.5 Update dependency json to v2.19.7 May 30, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from a049dbf to 0b025df Compare May 30, 2026 11:25
@renovate renovate Bot changed the title Update dependency json to v2.19.7 Update dependency json to v2.19.8 Jun 6, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 0b025df to 58d1044 Compare June 6, 2026 11:36
@renovate renovate Bot changed the title Update dependency json to v2.19.8 Update dependency json to v2.19.9 Jun 11, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 58d1044 to 06c6633 Compare June 11, 2026 20:06
@renovate renovate Bot changed the title Update dependency json to v2.19.9 Update dependency json to v2.20.0 Jun 24, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 06c6633 to 27642c5 Compare June 24, 2026 07:40
@renovate renovate Bot changed the title Update dependency json to v2.20.0 Update dependency json to v2.21.1 Jul 16, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch 2 times, most recently from 73e2c9a to 104ef2a Compare July 21, 2026 17:57
@renovate renovate Bot changed the title Update dependency json to v2.21.1 Update dependency json to v2.21.2 Jul 31, 2026
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 104ef2a to 493e253 Compare July 31, 2026 23:54
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from 493e253 to 6a8248f Compare August 16, 2026 07:42
@renovate
renovate Bot force-pushed the renovate/json-2.x branch 2 times, most recently from 88f70c1 to fb03e81 Compare September 3, 2026 03:15
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from fb03e81 to f411d31 Compare September 6, 2026 03:46
@renovate
renovate Bot force-pushed the renovate/json-2.x branch from f411d31 to fbefdf4 Compare October 3, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants