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? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php