php8.5
Home/ Manual/ reference / json/ The JsonException class

The JsonException class

Exception thrown if JSON_THROW_ON_ERROR option is set for json_encode or json_decode. code contains the error type, for possible values see json_last_error.

Intro

Exception thrown if JSON_THROW_ON_ERROR option is set for json_encode() or json_decode(). code contains the error type, for possible values see json_last_error().

Class synopsis

extends Exception { }

Source: reference/json/jsonexception.xml · from the official PHP manual (php/doc-en)