NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #572 most downloaded on Packagist
UTF-8 compatible JSON5 parser for PHP
Last release 3 years ago
no release in 18 months
Ships fairly regularly
a new release about every 9 months
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
13 releases · first in 2017
You should not notice any breaking changes in this release unless you were using named parameters, or ignoring argument types defined in docblocks.
You should not notice any breaking changes in this release unless you were using named parameters, or ignoring argument types defined in docblocks.
json_decode()'s signature
$source is now $json$options is now $flagsmixed return type to match json_decode()SyntaxErrorSyntaxError's constructor:
$linenumber is now $lineNumber$columnNumber is now $columnAdded parameter and return types matching the existing docblocks
One column per quarter.
@throws docblocks needed for PhpStorm to recognize exceptions (#21)Fixed "small" integers always being cast to strings when JSON_BIGINT_AS_STRING is set
JSON_BIGINT_AS_STRING is set (#17)Fixed exceptions always being thrown on PHP 7.3+ when parsing valid JSON5 with JSON_THROW_ON_ERROR explicitly set to true
JSON_THROW_ON_ERROR explicitly set to true (#15)Removed support for PHP 5.6 and 7.0
Added .phpstorm.meta.php for better code completion
.phpstorm.meta.php for better code completionNow with 100% more PHP 7.3 compatibility!
Now with 100% more PHP 7.3 compatibility!
\JsonException (added in PHP 7.3)JSON_THROW_ON_ERRORSyntaxError class now extends from \JsonExceptionFixed exceptions not being thrown for incomplete objects/arrays
Modified the internal pointer and string manipulations to use bytes instead of characters for better performance
Fixed Fixed check for PHP 7+
This release contains massive performance improvements of 98% or more, especially for larger JSON inputs!
This release contains massive performance improvements of 98% or more, especially for larger JSON inputs!
json_decode() first in case normal JSON is given, since this function is much faster (#1)JSON_OBJECT_AS_ARRAY was improperly taking priority over assoc in some casesRemoved accidentally-public constant
[unreleased]: https://github.com/colinodell/json5/compare/v3.0.0...HEAD [3.0.0]: https://github.com/colinodell/json5/compare/v2.3.0...v3.0.0 [2.3.0]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →