You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundled yyjson is now upstream master a84070f (after 0.13.0), with two incremental-reader fixes, ibireme/yyjson#315 and 332be7a, the second of them security-relevant; fastjson does not call that reader and no longer compiles it.
yyjson's file I/O and JSON Pointer, Patch, and Merge Patch functions, which fastjson does not call, are no longer compiled into the module.
fastjson_encode() and fastjson_file_encode() give JSON_PARTIAL_OUTPUT_ON_ERROR precedence over JSON_THROW_ON_ERROR, like ext/json: with both flags they no longer throw JsonException, and they publish the encoding error or clear it on success.
Prebuilt macOS arm64 binaries are now built on macOS 15 and need macOS 15 or later, because setup-php no longer installs PHP on the macOS 14 runners. On older macOS, build from source with phpize.
fastjson_validate() now takes 0.47-0.90x the time of a full parse instead of 1.1-1.9x (Neoverse-N1), from in-place number reads and faster string and whitespace scanning in vendor patch P-009.
Fixed
Decimal numbers with 770 or more integer digits and a fraction could decode one double too high; they now round correctly (ibireme/yyjson#314).
fastjson_pointer_get() and fastjson_pointer_exists() now match document member names using decode's UTF-8 sanitization flags and reject target names that become duplicates after sanitization. JSON_INVALID_UTF8_SUBSTITUTE takes precedence when both UTF-8 flags are set.
Documented existing decode depth behavior: fastjson_decode() and fastjson_file_decode() apply $depth after parsing, so the limit does not bound parser memory or CPU time. This is a documentation correction; parsing behavior is unchanged.
Clarify fastjson_validate() documentation: the depth cap is checked after parsing, not an early-exit or memory bound, and deep inputs or long trailing numbers can allocate temporary storage.
fastjson_merge_patch() selects the last duplicate member at each merged object boundary before checking result depth, including small objects whose discarded values exceed $depth.
fastjson_file_encode() returns false with "Failed to write file" when the stream accepts every write but its flush fails, instead of reporting success.
Security
Fixed a use-after-free in fastjson_encode() and fastjson_file_encode() when a property hook or nested JsonSerializable callback detaches the object being encoded.
Fixed a use-after-free when a userspace stream's write or flush callback closes the stream during fastjson_file_encode().
Fixed a use-after-free when a userspace stream's read or eof callback closes the stream during fastjson_file_decode().