Свойство | Тип | Описание | |
---|---|---|---|
$jsonErrorMessages | array | List of JSON Error messages assigned to constant names for better handling of version differences |
Метод | Описание | |
---|---|---|
decode ( string $json, boolean $asArray = true ) : mixed | Decodes the given JSON string into a PHP data structure. | |
encode ( mixed $value, integer $options = 320 ) : string | Encodes the given value into a JSON string. | |
htmlEncode ( mixed $value ) : string | Encodes the given value into a JSON string HTML-escaping entities so it is safe to be embedded in HTML code. |
Метод | Описание | |
---|---|---|
handleJsonError ( integer $lastError ) | Handles BaseJson::encode and BaseJson::decode errors by throwing exceptions with the respective error message. | |
processData ( mixed $data, array &$expressions, string $expPrefix ) : mixed | Pre-processes the data before sending it to json_encode(). |
protected static handleJsonError ( integer $lastError ) | ||
$lastError | integer | error code from [json_last_error()](http://php.net/manual/en/function.json-last-error.php). |
public static htmlEncode ( mixed $value ) : string | ||
$value | mixed | the data to be encoded |
Результат | string | the encoding result |
public static array $jsonErrorMessages | ||
Результат | array |