Sourced from json's releases.
v2.9.1
What's Changed
- Add support for Solaris 10 which lacks strnlen()
v2.9.0
What's Changed
- 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.
Full Changelog: https://github.com/ruby/json/compare/v2.8.2...v2.9.0
v2.8.2
What's Changed
- JSON.load_file: explictly load the file as UTF-8
Full Changelog: https://github.com/ruby/json/compare/v2.8.1...v2.8.2
v2.8.1
- Fix the
java
version of the package to include the extension implementation. Only concerns JRuby.Full Changelog: https://github.com/ruby/json/compare/v2.8.0...v2.8.1
v2.8.0
What's Changed
- Emit a deprecation warning when
JSON.load
create custom types without thecreate_additions
option being explictly enabled.
- Prefer to use
JSON.unsafe_load(string)
orJSON.load(string, create_additions: true)
.- Emit a deprecation warning when serializing valid UTF-8 strings encoded in
ASCII_8BIT
akaBINARY
.- 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 parsejsonc
documents.- Many performance improvements to
JSON.parse
andJSON.load
, up to1.7x
faster on real world documents.- Some minor performance improvements to
JSON.dump
andJSON.generate
.JSON.pretty_generate
no longer include newline inside empty object and arrays.Parsing performance
Parsing performance is improved by 50-70% on realistic benchmarks, and even more on micro-benchmarks: https://gist.github.com/casperisfine/cf4b3a0594fae24b7d0eb93daaf3841a
== Parsing activitypub.json (58160 bytes) ruby 3.4.0dev (2024-11-06T07:59:09Z precompute-hash-wh.. 7943f98a8a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- json 2.7.2 638.000 i/100ms </tr></table>
... (truncated)
Sourced from json's changelog.
2024-12-18 (2.9.1)
- Fix support for Solaris 10.
2024-12-03 (2.9.0)
- 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.
2024-11-14 (2.8.2)
JSON.load_file
explictly read the file as UTF-8.2024-11-06 (2.8.1)
- Fix the java packages to include the extension.
2024-11-06 (2.8.0)
- Emit a deprecation warning when
JSON.load
create custom types without thecreate_additions
option being explictly enabled.
- Prefer to use
JSON.unsafe_load(string)
orJSON.load(string, create_additions: true)
.- Emit a deprecation warning when serializing valid UTF-8 strings encoded in
ASCII_8BIT
akaBINARY
.- 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 parsejsonc
documents.- Many performance improvements to
JSON.parse
andJSON.load
, up to1.7x
faster on real world documents.- Some minor performance improvements to
JSON.dump
andJSON.generate
.JSON.pretty_generate
no longer include newline inside empty object and arrays.2024-11-04 (2.7.6)
- Fix a regression in JSON.generate when dealing with Hash keys that are string subclasses, call
to_json
on them.2024-10-25 (2.7.5)
- 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
andjson
being loaded.2024-10-25 (2.7.4)
- 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
andjson_pure
being loaded (not officially supported).- Make
json_pure
Ractor compatible.2024-10-24 (2.7.3)
... (truncated)
f745ec1
Release 2.9.172f43d4
Merge pull request #719 from
ngoto/support-solaris-10-missing-strnlen48d4bbc
Add support for Solaris 10 which lacks strnlen()e1f6456
Release 2.9.020b501a
Merge pull request #716 from
byroot/fix-script-safe-kanji93a7f87
Fix generate(script_safe: true) to not confuse unrelated charactersd0c38f2
Add missing entry in changelog686dcb1
Merge pull request #713 from
mame/prevent-printf-format-warningb8c1490
Prevent a warning of "a candidate for gnu_printf format
attribute"dbd5042
Merge pull request #712 from
byroot/generation-error