Skip to content

Releases: ruby/json

v2.13.2

28 Jul 07:05
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.13.1...v2.13.2

v2.13.1

24 Jul 12:09
Compare
Choose a tag to compare

What's Changed

  • Fix support for older compilers without __builtin_cpu_supports.

Full Changelog: v2.13.0...v2.13.1

v2.13.0

17 Jul 08:29
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.12.2...v2.13.0

v2.12.2

23 May 15:11
Compare
Choose a tag to compare
  • Fix compiler optimization level.

Full Changelog: v2.12.1...v2.12.2

v2.12.1

23 May 15:11
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.12.0...v2.12.1

v2.12.0

23 May 15:10
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.11.3...v2.12.0

v2.11.3

05 May 12:40
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.11.2...v2.11.3

v2.11.2

05 May 12:39
Compare
Choose a tag to compare

What's Changed

  • Bring back JSON::PRETTY_STATE_PROTOTYPE with a deprecation

Full Changelog: v2.11.1...v2.11.2

v2.11.1

24 Apr 13:12
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.11.0...v2.11.1

v2.11.0

24 Apr 08:13
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: v2.10.2...v2.11.0