Methods |
public
static
|
stringify(
mixed $value,
int-mask-of<JSON_FORCE_OBJECT|JSON_INVALID_UTF8_IGNORE|JSON_INVALID_UTF8_SUBSTITUTE|JSON_NUMERIC_CHECK|JSON_PRESERVE_ZERO_FRACTION|JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE> $flags = 0,
): string
Convert a value to a JSON string
Convert a value to a JSON string
|
#
|
public
static
|
prettyPrint(
mixed $value,
int-mask-of<JSON_FORCE_OBJECT|JSON_INVALID_UTF8_IGNORE|JSON_INVALID_UTF8_SUBSTITUTE|JSON_NUMERIC_CHECK|JSON_PRESERVE_ZERO_FRACTION|JSON_THROW_ON_ERROR|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE> $flags = 0,
string $eol = PHP_EOL,
): string
Convert a value to a human-readable JSON string with native line endings
Convert a value to a human-readable JSON string with native line endings
|
#
|
public
static
|
parse(
string $json,
int-mask-of<JSON_BIGINT_AS_STRING|JSON_INVALID_UTF8_IGNORE|JSON_INVALID_UTF8_SUBSTITUTE|JSON_OBJECT_AS_ARRAY|JSON_THROW_ON_ERROR> $flags = 0,
): mixed
Convert a JSON string to a value
Convert a JSON string to a value
|
#
|
public
static
|
parseObjectAsArray(
string $json,
int-mask-of<JSON_BIGINT_AS_STRING|JSON_INVALID_UTF8_IGNORE|JSON_INVALID_UTF8_SUBSTITUTE|JSON_THROW_ON_ERROR> $flags = 0,
): mixed[]|int|float|string|bool|null
Convert a JSON string to a value, returning JSON objects as associative
arrays
Convert a JSON string to a value, returning JSON objects as associative
arrays
|
#
|