Download the PHP package colinodell/json5 without Composer
On this page you can find all versions of the php package colinodell/json5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
All versions of json5 with dependencies
Informations about the package json5
JSON5 for PHP - JSON for Humans
This library is a PHP fork of the JSON5 reference implementation.
JSON5 is a JS-compatible extension to JSON which allows comments, trailing commas, single-quoted strings, and more:
This package adds a
json5_decode() function which is a drop-in replacement for PHP's built-in
It takes the same exact parameters in the same order. For more details on these, see the PHP docs.
To achieve the best possible performance, it'll try parsing with PHP's native function (which usually fails fast) and then falls back to JSON5.
This function will always throw a
SyntaxError exception if parsing fails. This is a subclass of the new
\JsonException introduced in PHP 7.3.
Providing or omitting the
JSON_THROW_ON_ERROR option will have no effect on this behavior.
For users on PHP 7.2 and below: a PHP 7.3 polyfill is included with this library so that you can safely reference
JSON_THROW_ON_ERROR in your own code.
Binary / Executable
A binary/executable named
json5 is also provided for converting JSON5 to plain JSON via your terminal.
Converting a file named file.json5:
Converting a file and saving its output:
Converting from STDIN:
Converting from STDIN and saving the output:
Please see CHANGELOG for more information on what has changed recently.
Please see CODE_OF_CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
In addition to standard support, consider a Tidelift Subscription for professional support and get alerted when new releases or security issues come out.
- Colin O'Dell
- Aseem Kishore, the JSON5 project, and their contributors
- All other contributors to this project
The MIT License (MIT). Please see License File for more information.