All Versions
19
Latest Version
Avg Release Cycle
65 days
Latest Release
165 days ago

Changelog History
Page 1

  • v1.1.1 Changes

    March 03, 2022

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed warning when generating autoload classmap via composer.
  • v1.1.0 Changes

    February 19, 2022

    โž• Added

    • ๐Ÿ”€ Autoloading without Composer. Thanks @a-sync.
  • v1.0.1 Changes

    February 06, 2022

    ๐Ÿ›  Fixed

    • ๐ŸŽ Broken command make performance-tests
    • ๐ŸŽ Slight performance improvements
  • v1.0.0 Changes

    February 04, 2022

    โœ‚ Removed

    • โœ‚ Removed deprecated functions objects() and httpClientChunks().
    • โœ‚ Removed deprecated JsonMachine entrypoint class. Use Items instead.
    • โœ‚ Removed deprecated Decoder interface. Use ItemDecoder instead.
    • โœ‚ Removed Parser::getJsonPointer(). Use Parser::getJsonPointers()/Items::getJsonPointers() instead.
    • โœ‚ Removed Parser::getJsonPointerPath(). No replacement. Was not useful for anything other than testing and exposed internal implementation.

    ๐Ÿ”„ Changed

    ๐Ÿ›  Simplified and fixed decoding

    • JSON Pointer parts between slashes (a.k.a reference tokens) must be valid encoded JSON strings to be JSON Pointer RFC 6901 compliant. It means that no internal key decoding is performed anymore. You will have to change your JSON Pointers if you match against keys with escape sequences. diff Items::fromString( '{"quotes\"": [1, 2, 3]}', - ['pointer' => '/quotes"'] + ['pointer' => '/quotes\"'] );
    • Method ItemDecoder::decodeInternalKey() was deleted as well as related ValidStringResult. They are not used anymore as described in previous point.
    • PassThruDecoder does not decode keys anymore. Both the key and the value yielded are raw JSON now.

    Other

    • 0๏ธโƒฃ Default decoding structure of Parser is object. (You won't notice that unless you use Parser class directly)
    • SyntaxError renamed to SyntaxErrorException
    • Items::__construct accepts the options array instead of separate arguments. (You won't notice that unless you instantiate Items class directly)
    • Lexer renamed to Tokens
    • DebugLexer renamed to TokensWithDebugging

    โž• Added

    • ๐Ÿ‘€ Multiple JSON Pointers can be specified as an array in pointer option. See README. Thanks @fwolfsjaeger.
    • ๐Ÿ†• New methods available during iteration: Items::getCurrentJsonPointer() and Items::getMatchedJsonPointer() ๐Ÿ‘€ to track where you are. See README. Thanks @fwolfsjaeger.

    ๐Ÿ›  Fixed

    • Incorrect position information of TokensWithDebugging::getPosition(). Was constantly off by 1-2 bytes.
  • v0.8.0 Changes

    ๐Ÿ”„ Changed

    • ๐Ÿšš Internal decoders moved to ItemDecoder. ErrorWrappingDecoder decorator now requires ItemDecoder as well.
    • โฌ‡๏ธ Dropped PHP 5.6 support.

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ JsonMachine\JsonMachine entry point class is deprecated, use JsonMachine\Items instead.
    • ๐Ÿ—„ JsonMachine\JsonDecoder\Decoder interface is deprecated. Use JsonMachine\JsonDecoder\ItemDecoder instead.

    โž• Added

    • ๐Ÿ†• New entry point class Items replaces JsonMachine.
    • 0๏ธโƒฃ Object as default decoding structure instead of array in Items.
    • ๐Ÿ“œ Items::getIterator() now returns Parser's iterator directly. Call Items::getIterator() ๐Ÿ“œ instead of JsonMachine::getIterator()::getIterator() to get to Parser's iterator if you need it. Fixes https://stackoverflow.com/questions/63706550
    • Items uses options in its factory methods instead of growing number of many parameters. See Options in README.
    • Items introduces new debug option. See Options in README.
    • Noticeable performance improvements. What took 10 seconds in 0.7.* takes about 7 seconds in 0.8.0.
  • v0.7.1 Changes

    ๐Ÿ†• New features

    • ๐Ÿ‘ PHP 8.1 support
    • ๐Ÿ‘ท DEV: Build system switched to composer scripts and Makefile
  • v0.7.0 Changes

    ๐Ÿ†• New features

    • ๐Ÿ‘‰ Use a - in json pointer as a wildcard for an array index. Example: /users/-/id. Thanks @cerbero90
  • v0.6.1 Changes

    ๐Ÿ›  Fixed bugs

    • Empty dict at the end of an item was causing Syntax error in the next item. Reason: closing } did not set object key expectation to false. (#41 via PR #42).
  • v0.6.0 Changes

    ๐Ÿ†• New features

    • ๐Ÿ†• New: Json pointer can find scalar values in JSON document as well as iterable values. See [Getting single scalar values](README.md#getting-scalar-values)
    • ๐Ÿ“œ Parser ends when the end of the desired data is reached and does not heat up the atmosphere further.
    • Optimizations: about 15% speed gain.

    BC breaks

    • A json pointer that matches scalar value does not throw anymore, but the scalar value is yielded in foreach.
  • v0.5.0 Changes

    December 08, 2020

    ๐Ÿ†• New features

    • Introduced FileChunks class. Takes care of the proper resource management when iterating via JsonMachine::fromFile(). It is used internally, and you probably won't come across it.
    • ๐Ÿ†• New ErrorWrappingDecoder. Use it when you want to skip malformed JSON items. See [Decoders](README.md#decoders).

    BC breaks

    • StreamBytes and StringBytes renamed to StreamChunks and StringChunks. These are internal classes, and you probably won't notice the change unless you use them directly for some reason.