Skip to content

Releases: ruby/json

v2.20.0

23 Jun 14:24

Choose a tag to compare

What's Changed

  • 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.

Full Changelog: v2.19.8...v2.20.0

v2.19.9

11 Jun 18:49

Choose a tag to compare

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

Full Changelog: v2.19.8...v2.19.9

v2.19.8

11 Jun 18:48

Choose a tag to compare

What's Changed

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

Full Changelog: v2.19.7...v2.19.8

v2.19.7

28 May 10:05

Choose a tag to compare

What's Changed

  • 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.

Full Changelog: v2.19.6...v2.19.7

v2.19.6

28 May 07:03

Choose a tag to compare

What's Changed

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

Full Changelog: v2.19.5...v2.19.6

v2.19.5

04 May 04:58

Choose a tag to compare

What's Changed

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

Full Changelog: v2.19.4...v2.19.5

v2.19.4

18 Apr 21:09

Choose a tag to compare

What's Changed

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

Full Changelog: v2.19.2...v2.19.4

v2.19.3

25 Mar 11:04

Choose a tag to compare

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

Full Changelog: v2.19.2...v2.19.3

v2.19.2

18 Mar 17:28

Choose a tag to compare

What's Changed

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

Full Changelog: v2.19.1...v2.19.2

v2.17.1.2

18 Mar 17:46

Choose a tag to compare

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

Full Changelog: v2.17.1...v2.17.1.2