Support JSON With Commas and Comments (JWCC) in json_decode

From: Date: Tue, 23 Feb 2021 18:21:54 +0000
Subject: Support JSON With Commas and Comments (JWCC) in json_decode
Groups: php.internals 
Request: Send a blank email to internals+get-113237@lists.php.net to get a copy of this message
See https://nigeltao.github.io/blog/2021/json-with-commas-comments.html
for more information.

It is quite common to have trailing commas in JSON, and a lot of
parsers support it. I believe this could be trivially supported by
PHP, even if you skip adding support for comments.

Perhaps this could be disabled by default and made opt-in with a
option flag? json_decode already supports passing in options.

Is there any interest in this?


Thread (3 messages)

« previous php.internals (#113237) next »