colinodell/json5
UTF-8 compatible JSON5 parser for PHP
v3.0.0
27M downloads/mo
#545 most downloaded on Packagist
colinodell/json5
What this package is like to depend on
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
0 releases in the last 12 months
see the full history below
Release timeline
13 releases · Nov 2017 to Feb 2024Releases
latest 13-
v3.0.009 Feb 2024Release notes
Open source →You should not notice any breaking changes in this release unless you were using named parameters, or ignoring argument types defined in docblocks.
Changed
- Renamed function parameters to match
json_decode()'s signature$sourceis now$json$optionsis now$flags
- Added explicit
mixedreturn type to matchjson_decode() - Added proper types to all parameters and return values of
SyntaxError - Renamed two arguments in the
SyntaxError's constructor:$linenumberis now$lineNumber$columnNumberis now$column
Removed
- Removed support for PHP 7.x (8.0+ is now required)
Release notes
Open source →You should not notice any breaking changes in this release unless you were using named parameters, or ignoring argument types defined in docblocks.
Changed
- Renamed function parameters to match
json_decode()'s signature$sourceis now$json$optionsis now$flags
- Added explicit
mixedreturn type to matchjson_decode() - Added proper types to all parameters and return values of
SyntaxError - Renamed two arguments in the
SyntaxError's constructor:$linenumberis now$lineNumber$columnNumberis now$column
Removed
- Removed support for PHP 7.x (8.0+ is now required)
- Renamed function parameters to match
-
v2.3.027 Dec 2022Release notes
Open source →Added
- Added parameter and return types matching the existing docblocks
Fixed
- Fixed missing
@throwsdocblocks needed for PhpStorm to recognize exceptions (#21)
Release notes
Open source →Added
- Added parameter and return types matching the existing docblocks
Fixed
- Fixed missing
@throwsdocblocks needed for PhpStorm to recognize exceptions (#21)
-
v2.2.222 Feb 2022Release notes
Open source →Fixed
- Fixed "small" integers always being cast to strings when
JSON_BIGINT_AS_STRINGis set (#17) - Fixed exceptions not being thrown when invalid UTF-16 escape sequences are encountered in strings
Release notes
Open source →Fixed
- Fixed "small" integers always being cast to strings when
JSON_BIGINT_AS_STRINGis set (#17) - Fixed exceptions not being thrown when invalid UTF-16 escape sequences are encountered in strings
- Fixed "small" integers always being cast to strings when
-
v2.2.106 Nov 2021Release notes
Open source →Fixed
- Fixed exceptions always being thrown on PHP 7.3+ when parsing valid JSON5 with
JSON_THROW_ON_ERRORexplicitly set to true (#15)
Release notes
Open source →Fixed
- Fixed exceptions always being thrown on PHP 7.3+ when parsing valid JSON5 with
JSON_THROW_ON_ERRORexplicitly set to true (#15)
- Fixed exceptions always being thrown on PHP 7.3+ when parsing valid JSON5 with
-
v2.2.029 Nov 2020Release notes
Open source →Added
- Added support for PHP 8.0
Removed
- Removed support for PHP 5.6 and 7.0
Release notes
Open source →Added
- Added support for PHP 8.0
Removed
- Removed support for PHP 5.6 and 7.0
-
v2.1.028 Mar 2019Release notes
Open source →Added
- Added
.phpstorm.meta.phpfor better code completion - Added several tiny micro-optimizations
Removed
- Removed support for PHP 5.4 and 5.5
Release notes
Open source →Added
- Added
.phpstorm.meta.phpfor better code completion - Added several tiny micro-optimizations
Removed
- Removed support for PHP 5.4 and 5.5
- Added
-
v2.0.020 Sep 2018Release notes
Open source →Now with 100% more PHP 7.3 compatibility!
Added
- Added a polyfill for class
\JsonException(added in PHP 7.3) - Added a polyfill for constant
JSON_THROW_ON_ERROR
Changed
- The
SyntaxErrorclass now extends from\JsonException
Release notes
Open source →Added
- Added a polyfill for class
\JsonException(added in PHP 7.3) - Added a polyfill for constant
JSON_THROW_ON_ERROR
Changed
- The
SyntaxErrorclass now extends from\JsonException
- Added a polyfill for class
-
v1.0.520 Sep 2018 -
v1.0.414 Jan 2018Release notes
Open source →Changed
- Modified the internal pointer and string manipulations to use bytes instead of characters for better performance (#4)
Release notes
Open source →Changed
- Modified the internal pointer and string manipulations to use bytes instead of characters for better performance (#4)
-
v1.0.314 Jan 2018 -
v1.0.214 Jan 2018Release notes
Open source →This release contains massive performance improvements of 98% or more, especially for larger JSON inputs!
Added
- On PHP 7.x: parser will try using
json_decode()first in case normal JSON is given, since this function is much faster (#1)
Fixed
- Fixed multiple performance issues (#1)
- Fixed bug where
JSON_OBJECT_AS_ARRAYwas improperly taking priority overassocin some cases
- On PHP 7.x: parser will try using
-
v1.0.111 Nov 2017 -
v1.0.011 Nov 2017