Changelog History
Page 2
-
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 viaJsonMachine::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
andStringBytes
renamed toStreamChunks
andStringChunks
. These are internal classes, and you probably won't notice the change unless you use them directly for some reason.
- Introduced
-
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 incomposer.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 wayobjects()
works is that it casts decoded arrays to objects. It brings some unnecessary overhead and risks on huge datasets. 0๏ธโฃ Alternative is to useExtJsonDecoder
which decodes items as objects by default (same asjson_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 newhttpClientChunks
helper. See example in src/examples.
๐ Also PHP 7.4 support๐ Bug Fixes (3)
#6, thanks @Mwisho
#14, thanks @formatz
#19, thanks @LaravelFreelancerNLBC breaks (0)
-
v0.3.2 Changes
March 20, 2019 -
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.
๐ Fixedjson_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
andfalse
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.
-
v0.2.1 Changes
November 29, 2018License, readme and logo changes.
-
v0.2.0 Changes
November 29, 2018- ๐ Renamed to JSON Machine
- ๐ณ Tests all supported PHP versions via Docker
- ๐ New logo