Json
class Json
Constants
| MAXIMUM_NESTING_DEPTH |
Maximum number of nested JSON containers. |
Methods
static string
encode(mixed $data, int $flags = JSON_UNESCAPED_UNICODE, int $depth = self::MAXIMUM_NESTING_DEPTH)
Encode a value to JSON.
static mixed
decode(string $json, bool $assoc = true, int $depth = self::MAXIMUM_NESTING_DEPTH, int $flags = 0)
Decode a JSON string.
static bool
validate(string $json, int $depth = self::MAXIMUM_NESTING_DEPTH, int $flags = 0)
Validate a JSON string.
Details
at line 21
static string
encode(mixed $data, int $flags = JSON_UNESCAPED_UNICODE, int $depth = self::MAXIMUM_NESTING_DEPTH)
Encode a value to JSON.
at line 40
static mixed
decode(string $json, bool $assoc = true, int $depth = self::MAXIMUM_NESTING_DEPTH, int $flags = 0)
Decode a JSON string.
at line 50
static bool
validate(string $json, int $depth = self::MAXIMUM_NESTING_DEPTH, int $flags = 0)
Validate a JSON string.