On Tue Jul 14, 2026 at 11:18 PM UTC, Zsolt Parragi wrote:
>> What are your thoughts on first starting with support for JSONC? It has
>> no implications other than comments (single-line and multi-line) and
>> trailing commas. We could collaborate and commit that, and then
>> subsequently work on JSON5 support. It should enable the JSON5 support
>> patches to be even smaller than what you posted already.
>
> I also sent my patchset[1] for JSONC/JSON5. I wanted to organize it
> into smaller patches and stress test it before sharing, but I think
> it's in a good enough shape now.
> My logic was similar: the first patch in the series is the JSONC
> support, as that's a feature usable on its own.
Awesome. I will review and see how they compare against my changes!
>> Do we want to support JSONC/JSON5 in the incremental parser? My
>> inclination is yes so the parsers are consistent in what they support.
>
> I included it for completeness, but the incremental parser has no real
> user other than the tests, and it's complex. A patch without that
> would be significantly smaller. Most (nearly all) of the corner case
> issues I identified while testing the patch were also in that.
I was able to get a patch for the incremental parser to support comments
in:
1 file changed, 272 insertions(+), 41 deletions(-)
A patch to the incremental parser to support trailing commas is even
smaller:
1 file changed, 87 insertions(+), 1 deletions(-)
These stats don't include the additional tests.
> [1]:
> https://www.postgresql.org/message-id/CAN4CZFP5dvO4sij414YYG%2B4Hghf3M5m2oPiyR_vNgRj3vhQ_0Q%40mail.gmail.com
--
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)