<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/json/parser, branch v4.0.3</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] Add `allow_control_characters` parsing option</title>
<updated>2025-12-11T10:53:15+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-11T10:09:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6ad4e6a298e7b5d0f925aacecc5d375968ebde15'/>
<id>6ad4e6a298e7b5d0f925aacecc5d375968ebde15</id>
<content type='text'>
While it's not allowed by the spec, some parsers like Oj do
accept it, and it can be blocking a transition.

Having this feature can help people migrate.

https://github.com/ruby/json/commit/3459499cb3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While it's not allowed by the spec, some parsers like Oj do
accept it, and it can be blocking a transition.

Having this feature can help people migrate.

https://github.com/ruby/json/commit/3459499cb3
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Add a specific error for unescaped newlines</title>
<updated>2025-12-10T10:14:39+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-10T09:54:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=023c6d808a85bd8fb711ac3986972618037f12ad'/>
<id>023c6d808a85bd8fb711ac3986972618037f12ad</id>
<content type='text'>
It's the most likely control character so it's worth
giving a better error message for it.

https://github.com/ruby/json/commit/1da3fd9233
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's the most likely control character so it's worth
giving a better error message for it.

https://github.com/ruby/json/commit/1da3fd9233
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Fix a regression in parsing of unicode surogate pairs</title>
<updated>2025-12-04T08:10:41+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-04T08:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d58a45d32ffe8afed1685e54017fb81cea898867'/>
<id>d58a45d32ffe8afed1685e54017fb81cea898867</id>
<content type='text'>
Fix: https://github.com/ruby/json/issues/912

In the case of surogate pairs we consume two backslashes, so
`json_next_backslash` need to ensure it's not sending us back in the
stream.

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

In the case of surogate pairs we consume two backslashes, so
`json_next_backslash` need to ensure it's not sending us back in the
stream.

https://github.com/ruby/json/commit/0fce370c41
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Fix macro arguments</title>
<updated>2025-12-03T02:19:06+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-12-03T01:56:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=28d9493b98c7fef39845393ea00ef5eb6947091b'/>
<id>28d9493b98c7fef39845393ea00ef5eb6947091b</id>
<content type='text'>
`ALWAYS_INLINE()` and `NOINLINE()` are defined with one argument.

https://github.com/ruby/json/commit/8fb727901e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`ALWAYS_INLINE()` and `NOINLINE()` are defined with one argument.

https://github.com/ruby/json/commit/8fb727901e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] parser.c: Record escape positions while parsing</title>
<updated>2025-11-22T13:52:26+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-11-22T13:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c7a84ae0bb8c6dab3463076d7e5ca9b6f89880f4'/>
<id>c7a84ae0bb8c6dab3463076d7e5ca9b6f89880f4</id>
<content type='text'>
We can then pass them to the decoder to save having to parse
the string again.

```
== Parsing activitypub.json (58160 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after     1.275k i/100ms
Calculating -------------------------------------
               after     12.774k (± 0.8%) i/s   (78.29 μs/i) -     65.025k in   5.090834s

Comparison:
              before:    12314.3 i/s
               after:    12773.8 i/s - 1.04x  faster

== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after   143.000 i/100ms
Calculating -------------------------------------
               after      1.441k (± 0.2%) i/s  (693.86 μs/i) -      7.293k in   5.060345s

Comparison:
              before:     1430.1 i/s
               after:     1441.2 i/s - 1.01x  faster

== Parsing citm_catalog.json (1727030 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after    69.000 i/100ms
Calculating -------------------------------------
               after    695.919 (± 0.4%) i/s    (1.44 ms/i) -      3.519k in   5.056691s

Comparison:
              before:      687.8 i/s
               after:      695.9 i/s - 1.01x  faster
```

https://github.com/ruby/json/commit/4f4551f993
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can then pass them to the decoder to save having to parse
the string again.

```
== Parsing activitypub.json (58160 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after     1.275k i/100ms
Calculating -------------------------------------
               after     12.774k (± 0.8%) i/s   (78.29 μs/i) -     65.025k in   5.090834s

Comparison:
              before:    12314.3 i/s
               after:    12773.8 i/s - 1.04x  faster

== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after   143.000 i/100ms
Calculating -------------------------------------
               after      1.441k (± 0.2%) i/s  (693.86 μs/i) -      7.293k in   5.060345s

Comparison:
              before:     1430.1 i/s
               after:     1441.2 i/s - 1.01x  faster

== Parsing citm_catalog.json (1727030 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after    69.000 i/100ms
Calculating -------------------------------------
               after    695.919 (± 0.4%) i/s    (1.44 ms/i) -      3.519k in   5.056691s

Comparison:
              before:      687.8 i/s
               after:      695.9 i/s - 1.01x  faster
```

https://github.com/ruby/json/commit/4f4551f993
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Fix the parser to not accept invalid escapes</title>
<updated>2025-11-22T13:12:16+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-11-22T11:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=735762747d818563555e13932b8e49f3801a8c7f'/>
<id>735762747d818563555e13932b8e49f3801a8c7f</id>
<content type='text'>
Only `"\/bfnrtu` are valid after a backslash.

https://github.com/ruby/json/commit/f7f8f552ed
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only `"\/bfnrtu` are valid after a backslash.

https://github.com/ruby/json/commit/f7f8f552ed
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Use booleans in string_scan</title>
<updated>2025-11-22T09:32:48+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-11-22T09:32:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ec296f63e33e78a95a20378b689efc0bf74f271a'/>
<id>ec296f63e33e78a95a20378b689efc0bf74f271a</id>
<content type='text'>
https://github.com/ruby/json/commit/256cad5def
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/256cad5def
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Move RUBY_TYPED_FROZEN_SHAREABLE macro to json.h</title>
<updated>2025-11-21T16:12:35+00:00</updated>
<author>
<name>Étienne Barrié</name>
<email>etienne.barrie@gmail.com</email>
</author>
<published>2025-11-21T11:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ffa105c27f943bf4170247137733ff7640cf24d0'/>
<id>ffa105c27f943bf4170247137733ff7640cf24d0</id>
<content type='text'>
https://github.com/ruby/json/commit/2a4ebe8250
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/2a4ebe8250
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Ractor-shareable JSON::Coder</title>
<updated>2025-11-21T16:12:35+00:00</updated>
<author>
<name>Étienne Barrié</name>
<email>etienne.barrie@gmail.com</email>
</author>
<published>2025-11-18T10:44:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bdca2a9975c7859f2e1702a517d59bb6cb254acb'/>
<id>bdca2a9975c7859f2e1702a517d59bb6cb254acb</id>
<content type='text'>
https://github.com/ruby/json/commit/58d60d6b76
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/58d60d6b76
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Remove unused symbols</title>
<updated>2025-11-20T17:23:37+00:00</updated>
<author>
<name>Étienne Barrié</name>
<email>etienne.barrie@gmail.com</email>
</author>
<published>2025-11-20T15:41:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=48027256cf9d3e3bf12603184448cf88406b92d0'/>
<id>48027256cf9d3e3bf12603184448cf88406b92d0</id>
<content type='text'>
https://github.com/ruby/json/commit/9364d0c761
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/9364d0c761
</pre>
</div>
</content>
</entry>
</feed>
