Because of licensing issue (php bug #63520) with standard json extension, part of PHP, I wrote a new extension to replace it.
This new extension, temporarily named jsonc is a drop-in free alternative released under the PHP License.
The current extension license is not free as it includes an usage restriction (The Software shall be used for Good, not Evil).
So, this alternative is free, as I prefere to quote Albert Einstein :
The world will not be destroyed by those who do evil, but by those who watch them without doing anything.
Sources are available on github : pecl-json-c
Installation:
yum --enablerepo=remi install php-pecl-json
You must disable the default json.so extension (in /etc/php.d/json.ini) before you can enable the new jsonc.so (in /etc/php.d/jsonc.ini).
json_encode function is the same than in php 5.5.
json_decode function use the json-c library.
New feature: the JsonIncrementalParser class allow to parse data incrementally without need to load all in memory.
This extension is already ready for integration in debian unstable, See Bye bye non-free PHP JSON extension.
I plan to submit a PHP RFC to switch to this new free implementation in PHP next.
Your feedback is expected.