throw new UnsupportedFormatException(sprintf('Deserialization for the format "%s" is not supported.',
$format));
} $data =
$this->
decode($data,
$format,
$context);
return $this->
denormalize($data,
$type,
$format,
$context);
} public function normalize(mixed
$data, string
$format = null, array
$context =
[]): array|string|int|float|bool|\ArrayObject|null
{ // If a normalizer supports the given data, use it
if ($normalizer =
$this->
getNormalizer($data,
$format,
$context)) { return $normalizer->
normalize($data,
$format,
$context);
} if (null ===
$data || \
is_scalar($data)) { return $data;
} if (\
is_array($data) && !
$data && ($context[self::EMPTY_ARRAY_AS_OBJECT
] ?? false
)) { return new \
ArrayObject();
}