JsonSerializer
class JsonSerializer implements SerializerInterface (View source)
Encodes and decodes data to and from JSON. Decodes to associative arrays by default.
Throws a JsonDecodeException if decoding or encoding fails.
Methods
mixed
decode(mixed $value)
Deserialize the value.
mixed
encode(mixed $value)
Serialize the value.
static JsonSerializer
Details
__construct(JsonEncode $encoder = null, JsonDecode $decoder = null)
No description
mixed
decode(mixed $value)
Deserialize the value.
mixed
encode(mixed $value)
Serialize the value.
static JsonSerializer
make(JsonEncode $encoder = null, JsonDecode $decoder = null)
No description