public static function unserialize()

in src/Serializer/JsonSerializer.php [64:78]


    public static function unserialize(string $data, array $options = [])
    {
        try {
            $type = $options['type'] ?? 'array';
            if (!in_array($type, ['object', 'array'])) {
                throw new UndefinedPropertyException("The unserialize 'type' option must be object or array");
            }
            return json_decode($data, $type === 'array', 512, JSON_THROW_ON_ERROR);
        } catch (JsonException $e) {
            throw new InvalidJsonException(sprintf(
                "Not a valid Json: %s", 
                $e->getMessage()
            ));
        }
    }