Releases: crazyxman/simdjson_php
Releases · crazyxman/simdjson_php
3.0.0
- Add SimdJsonValueError. In php 8.0+, it extends ValueError, and it extends Error in older php versions.
This provides an API similar to the JSON module, which started throwing ValueError for invalid depths in php 8.0. - Throw SimdJsonValueError instead of emitting notices if $depth is too small or too large in all simdjson PHP functions.
simdjson_is_valid(), simdjson_key_count() and simdjson_key_exists() now have non-null return types. - Throw a SimdJsonException in simdjson_key_exists on error conditions such as invalid json, to be consistent with other simdjson PHP functions.
- Add an optional boolean
$throw_if_uncountable = false
to simdjson_key_count.
When this is overridden to be true, simdjson_key_count will throw a SimdJsonException if the JSON pointer refers to a value that exists but is neither an array nor an object instead of returning 0. - Rename the parameter $assoc to $associative in simdjson_decode and simdjson_key_value, to match naming practices used in json_decode()
2.1.0
-
Allow out of range 64-bit values in JSON integer syntax and allow floating point values outside of the max/min finite floating point values (i.e. parsing to +/- infinity).
This allows simdjson_decode() to be used as a replacement for json_decode() in more use cases.
-
Return the correct value in simdjson_key_count() for JSON pointers to arrays/objects exceeding size 0xFFFFFF.
Previously, this would be limited to returning at most 0xFFFFFF(16777215). -
Throw 'SimdJsonException extends RuntimeException' instead of RuntimeException.
-
Set the error code from simdjson as SimdJsonException->getCode()
-
Expose error_code constants from simdjson as
SIMDJSON_ERR_$ERRCODENAME
2.0.5
- Reuse PHP's 1-byte and 0-byte interned strings in simdjson_decode, reducing memory usage for those strings. (e.g. for the key/value in '{"x":""}')
- Return correct count in simdjson_key_count. Properly return counts larger than 0xFFFFFF instead of returning 0xFFFFFF.
2.0.4
- Add
-fvisibility=hidden
to compiler options to reduce compiled extension size by avoiding exporting symbols by default. - If the requested json parsing $depth is excessively large when reallocating larger buffers for the C simdjson parser,
then internally use a smaller $depth that would behave identically with lower memory usage. (#66) - Update simdjson to properly reject surrogate pairs with an invalid low surrogate. (https://en.wikipedia.org/wiki/UTF-16)
2.0.3
- Fix error validating package.xml when uploading to PECL due to blank username of lead without a PECL account.
2.0.2
- Fix license metadata in package.xml
2.0.1
- On 32-bit builds, convert decoded 64-bit integers to floats if they would be out of range.
2.0.0
- Initial PECL release