<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/json/json_common_interface_test.rb, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/json] Fix duplicated test_unsafe_load_with_options test case</title>
<updated>2025-12-03T14:13:39+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-03T14:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=05383a1de2f2afe263ab894e851eca51e40bb543'/>
<id>05383a1de2f2afe263ab894e851eca51e40bb543</id>
<content type='text'>
https://github.com/ruby/json/commit/7b62fac525
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/7b62fac525
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Improve `JSON.load` and `JSON.unsafe_load` to allow passing options as second argument</title>
<updated>2025-12-03T13:48:31+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-03T13:41:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4d377c8c2eedc42f274b3b2a841fa24d5b4c5541'/>
<id>4d377c8c2eedc42f274b3b2a841fa24d5b4c5541</id>
<content type='text'>
Otherwise it's very error prone.

https://github.com/ruby/json/commit/c54de70f90
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise it's very error prone.

https://github.com/ruby/json/commit/c54de70f90
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Get rid of JSON.deep_const_get (private API)</title>
<updated>2025-11-07T08:46:00+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-11-07T08:45:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=da6ba845545036f9bb89dae390dda78e23a3a337'/>
<id>da6ba845545036f9bb89dae390dda78e23a3a337</id>
<content type='text'>
https://github.com/ruby/json/commit/826cb2a4f4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/826cb2a4f4
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Time.new because JSON.unsafe_load losts fractions of a second and</title>
<updated>2025-09-03T14:38:37+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-09-03T12:41:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=837d74104cf9339a344cf9f33016aa73b2c51e72'/>
<id>837d74104cf9339a344cf9f33016aa73b2c51e72</id>
<content type='text'>
JSON.unsafe_load with Time object returns String

```
  1) Failure:
JSONCommonInterfaceTest#test_unsafe_load_default_options [/path/to/ruby/test/json/json_common_interface_test.rb:230]:
&lt;2025-09-03 14:28:31.293635 +0200&gt; expected but was
&lt;"2025-09-03 14:28:31 +0200"&gt;.
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
JSON.unsafe_load with Time object returns String

```
  1) Failure:
JSONCommonInterfaceTest#test_unsafe_load_default_options [/path/to/ruby/test/json/json_common_interface_test.rb:230]:
&lt;2025-09-03 14:28:31.293635 +0200&gt; expected but was
&lt;"2025-09-03 14:28:31 +0200"&gt;.
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Added testing for JSON.unsafe_load. Fixes NoMethodError</title>
<updated>2025-09-03T14:38:37+00:00</updated>
<author>
<name>Robin Miller</name>
<email>robin@tenjin.ca</email>
</author>
<published>2025-09-02T04:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=242680efc5aab477b78b1aaa7299feec5d98bb06'/>
<id>242680efc5aab477b78b1aaa7299feec5d98bb06</id>
<content type='text'>
when passing proc to JSON.unsafe_load, matching the changes made in
https://github.com/ruby/json/commit/73d2137fd3ad.

https://github.com/ruby/json/commit/77292cbc9b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when passing proc to JSON.unsafe_load, matching the changes made in
https://github.com/ruby/json/commit/73d2137fd3ad.

https://github.com/ruby/json/commit/77292cbc9b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Stop caching the generator state pointer</title>
<updated>2025-04-30T06:12:41+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-04-25T05:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8fe3fb5d5a020d9c567cce92dc8812ae7bd8c327'/>
<id>8fe3fb5d5a020d9c567cce92dc8812ae7bd8c327</id>
<content type='text'>
Fix: https://github.com/ruby/json/issues/790

If we end up calling something that spills the state
on the heap, the pointer we received is outdated and
may be out of sync.

https://github.com/ruby/json/commit/2ffa4ea46b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix: https://github.com/ruby/json/issues/790

If we end up calling something that spills the state
on the heap, the pointer we received is outdated and
may be out of sync.

https://github.com/ruby/json/commit/2ffa4ea46b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Add missing assert_deprecated_warning</title>
<updated>2025-03-28T03:44:53+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-03-27T14:07:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3bbb52f5c5fb086492c9799ea7b48675cfde50f1'/>
<id>3bbb52f5c5fb086492c9799ea7b48675cfde50f1</id>
<content type='text'>
https://github.com/ruby/json/commit/1b16a82980
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/1b16a82980
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] JSON.load invoke the proc callback directly from the parser.</title>
<updated>2025-03-28T03:44:53+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-03-26T14:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e8c46f4ca5e6ba2638fbfc81fdb9d141cd88e99a'/>
<id>e8c46f4ca5e6ba2638fbfc81fdb9d141cd88e99a</id>
<content type='text'>
And substitute the return value like `Marshal.load` doesm
which I can only assume was the intent.

This also open the door to re-implement all the `create_addition`
logic in `json/common.rb`.

https://github.com/ruby/json/commit/73d2137fd3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And substitute the return value like `Marshal.load` doesm
which I can only assume was the intent.

This also open the door to re-implement all the `create_addition`
logic in `json/common.rb`.

https://github.com/ruby/json/commit/73d2137fd3
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Deprecate all `*_default_options`</title>
<updated>2025-03-27T02:37:27+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-03-26T10:47:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f4529ecbe7adf6cc24bf8f8aa92becbc005e897a'/>
<id>f4529ecbe7adf6cc24bf8f8aa92becbc005e897a</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] JSON.dump: write directly into the provided IO</title>
<updated>2024-11-26T06:11:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-05T18:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee0de3fd4e02f95f42fd3fe9cb18bcfe3e7e2bf1'/>
<id>ee0de3fd4e02f95f42fd3fe9cb18bcfe3e7e2bf1</id>
<content type='text'>
Ref: https://github.com/ruby/json/issues/524

Rather than to buffer everything in memory.

Unfortunately Ruby doesn't provide an API to write into
and IO without first allocating a string, which is a bit
wasteful.

https://github.com/ruby/json/commit/f017af6c0a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ref: https://github.com/ruby/json/issues/524

Rather than to buffer everything in memory.

Unfortunately Ruby doesn't provide an API to write into
and IO without first allocating a string, which is a bit
wasteful.

https://github.com/ruby/json/commit/f017af6c0a
</pre>
</div>
</content>
</entry>
</feed>
