Symfony\Component\Serializer\Encoder\JsonDecode
Decodes JSON data
- Author: Sander Coolen <sander@jibber.nl>
Synopsis
class JsonDecode
implements
DecoderInterface
{
- // members
- private Boolean $associative;
- private integer $recursionDepth;
- private $lastError;
- protected $serializer;
- // methods
- public void __construct()
- public integer getLastError()
- public mixed decode()
- public void supportsDecoding()
- private array resolveContext()
Hierarchy
Members
private
- $associative
—
Symfony\Component\Serializer\Encoder\Boolean
Specifies if the returned result should be an associative array or a nested stdClass object hierarchy. - $lastError
- $recursionDepth
—
integer
Specifies the recursion depth.
protected
- $serializer
Methods
private
- resolveContext() — Merges the default options of the Json Decoder with the passed context.
public
- __construct() — Constructs a new JsonDecode instance.
- decode() — Decodes data.
- getLastError() — Returns the last decoding error (if any).
- supportsDecoding() — {@inheritdoc}