Project

General

Profile

« Previous | Next » 

Revision f4529ecb

Added by byroot (Jean Boussier) 8 months ago

[ruby/json] Deprecate all *_default_options

Globally changing the behavior of the library is a bad idea, as
many different libraries may rely on json and may not expect it
and likely never tested that a different default config works for them.

If you need to change the behavior of JSON, it's best to do it only
locally, and not globally.

In addition the new JSON::Coder interface is much more suited for
that.

Another reason for the deprecation is that it's impossible to
make JSON.load and JSON.dump Ractor-safe with such API.

https://github.com/ruby/json/commit/172762c6e4