private function getNormalizer($data, $format = null) {
foreach ($this->normalizers as $normalizer) {
if ($normalizer instanceof NormalizerInterface && $normalizer
->supportsNormalization($data, $format)) {
return $normalizer;
}
}
throw new RuntimeException(sprintf('No normalizer found for format "%s".', $format));
}