class JsonEncoder implements EncoderInterface, DecoderInterface
Encodes JSON data
FORMAT |
__construct(JsonEncode $encodingImpl = null, JsonDecode $decodingImpl = null) | ||
int | getLastEncodingError() Returns the last encoding error (if any). | |
int | getLastDecodingError() Returns the last decoding error (if any). | |
scalar | encode(mixed $data, string $format, array $context = array()) Encodes data into the given format. | |
mixed | decode(scalar $data, string $format, array $context = array()) Decodes a string into PHP data. | |
bool | supportsEncoding(string $format) Checks whether the serializer can encode to given format. | |
bool | supportsDecoding(string $format) Checks whether the deserializer can decode from given format. | |
static string | getLastErrorMessage() Resolves jsonlasterror message. |
Returns the last encoding error (if any).
Returns the last decoding error (if any).
Encodes data into the given format.
Decodes a string into PHP data.
Checks whether the serializer can encode to given format.
Checks whether the deserializer can decode from given format.
Resolves jsonlasterror message.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Serializer/Encoder/JsonEncoder.html