Skip to content

Releases: colinodell/json5

v3.0.0

09 Feb 13:07
v3.0.0
5724d21
Compare
Choose a tag to compare

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
    • $source is now $json
    • $options is now $flags
  • Added explicit mixed return type to match json_decode()
  • Added proper types to all parameters and return values of SyntaxError
  • Renamed two arguments in the SyntaxError's constructor:
    • $linenumber is now $lineNumber
    • $columnNumber is now $column

Removed

  • Removed support for PHP 7.x (8.0+ is now required)

v2.3.0

27 Dec 16:46
v2.3.0
15b063f
Compare
Choose a tag to compare

Added

  • Added parameter and return types matching the existing docblocks

Fixed

  • Fixed missing @throws docblocks needed for PhpStorm to recognize exceptions (#21)

v2.2.2

22 Feb 14:43
v2.2.2
2b0fabd
Compare
Choose a tag to compare

Fixed

  • Fixed "small" integers always being cast to strings when JSON_BIGINT_AS_STRING is set (#17)
  • Fixed exceptions not being thrown when invalid UTF-16 escape sequences are encountered in strings

v2.2.1

06 Nov 05:26
v2.2.1
361fd1b
Compare
Choose a tag to compare

Fixed

  • Fixed exceptions always being thrown on PHP 7.3+ when parsing valid JSON5 with JSON_THROW_ON_ERROR explicitly set to true (#15)

v2.2.0

29 Nov 14:53
dd7f788
Compare
Choose a tag to compare

Added

  • Added support for PHP 8.0

Removed

  • Removed support for PHP 5.6 and 7.0

v2.1.0

28 Mar 18:29
v2.1.0
86136a7
Compare
Choose a tag to compare

Added

  • Added .phpstorm.meta.php for better code completion
  • Added several tiny micro-optimizations

Removed

  • Removed support for PHP 5.4 and 5.5

v2.0.0

20 Sep 16:07
Compare
Choose a tag to compare

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 SyntaxError class now extends from \JsonException

v1.0.5

20 Sep 15:44
Compare
Choose a tag to compare

Fixed

  • Fixed exceptions not being thrown for incomplete objects/arrays

v1.0.4

14 Jan 23:55
a720fbd
Compare
Choose a tag to compare

Changed

  • Modified the internal pointer and string manipulations to use bytes instead of characters for better performance (#4)

v1.0.3

14 Jan 15:03
Compare
Choose a tag to compare

Fixed

  • Fixed check for PHP 7+