All Versions
13
Latest Version
Avg Release Cycle
84 days
Latest Release
-

Changelog History
Page 1

  • 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.
  • v0.4.1 Changes

    December 01, 2020

    ๐Ÿš€ See CHANGELOG for changes and release notes.

  • v0.4.0 Changes

    November 09, 2020

    ๐Ÿ†• New features

    • [Custom decoder](README.md#custom-decoder)
    • ๐Ÿ‘ PHP 8 support (thanks @snapshotpl) ## BC breaks
    • ext-json is not required in composer.json anymore, because custom decoder might not need it. However built-in decoders depend on it so it must be present if you use them.
    • All exceptions now extend JsonMachineException (thanks @gabimem)
    • Throws UnexpectedEndSyntaxErrorException on an unexpected end of JSON structure (thanks @gabimem)
    • ๐Ÿ—„ Function httpClientChunks() is deprecated so that compatibility with Symfony HttpClient is not on the shoulders of JSON Machine maintainer. The code is simple and everyone can make their own ๐Ÿšš function and maintain it. The code was moved to [examples](src/examples/symfonyHttpClient.php).
    • ๐Ÿ—„ Function objects() is deprecated. The way objects() works is that it casts decoded arrays to objects. It brings some unnecessary overhead and risks on huge datasets. 0๏ธโƒฃ Alternative is to use ExtJsonDecoder which decodes items as objects by default (same as json_decode). ```php <?php

    use JsonMachine\JsonDecoder\ExtJsonDecoder; use JsonMachine\JsonMachine;

    $jsonMachine = JsonMachine::fromFile('path/to.json', '', new ExtJsonDecoder);

    Therefore no additional casting is required.
    - Invalid json object keys will now throw and won't be ignored anymore.
    ## ๐Ÿ›  Fixed bugs
    - Decoding of json object keys checks for errors and does not silently ignore them.
    
  • v0.3.3 Changes

    December 20, 2019

    ๐Ÿ†• New Features (1)

    ๐Ÿ‘€ Minor feature: JsonMachine::fromIterable() - an alias to constructor, but emphasizing the fact that an iterable can be a source of json data. Very handy in conjunction with Symfony HttpClient and new httpClientChunks helper. See example in src/examples.
    ๐Ÿ‘ Also PHP 7.4 support

    ๐Ÿ› Bug Fixes (3)

    #6, thanks @Mwisho
    #14, thanks @formatz
    #19, thanks @LaravelFreelancerNL

    BC breaks (0)

  • v0.3.2 Changes

    March 20, 2019

    ๐Ÿ†• New Features (0)

    ๐Ÿ› Bug Fixes (1)

    ๐Ÿ“œ #9 Fixed json parsing with "\\" at the end of a string. Thanks, @marenkov.

    BC breaks (0)

  • v0.3.1 Changes

    March 16, 2019

    ๐Ÿ†• New Features (3)

    ๐Ÿณ Docker: Each PHP docker image has xdebug installed
    ๐Ÿณ Docker: Testing script tries to pull the newest image of each supported php version
    โšก๏ธ Docker: Updated PHP 7.3 version to stable

    ๐Ÿ› Bug Fixes (4)

    Json pointer was failing when iterated subtree was not the first at its level #7. Thanks, @rybakit.
    ๐Ÿ›  Fixed json_decode call on performace test to return array same as JsonMachine
    Got rid of the quiet dependency on local ./composer binary
    Reworded guzzle example #3. Thanks, @Mwisho.

    BC breaks (2)

    Only lower case of null, true and false is allowed - was non standard and shouldn't affect anyone
    ๐Ÿ‘Œ Support for + sign in front of positive number was dropped - was non standard and shouldn't affect anyone

  • v0.3.0 Changes

    December 13, 2018

    ๐Ÿ†• New Features (1)

    • JsonMachine::fromString now consumes about 4ร— less memory than previous version, by utilizing PHP's copy on write behaviour. JSON string is not copied anymore - only iterated over.

    ๐Ÿ› Bug Fixes (0)

    BC breaks (1)

    • Internal: Constructor signature of Lexer has changed. It newly requires \Traversable instead of a stream resource. It doesn't affect public JsonMachine API.