Closed
Description
Symfony version(s) affected: 4.3.4
Description
Hello, I am trying to deserialize an array of integers but I am getting this exception: Could not denormalize object of type int[], no supporting normalizer found.
Previously I was using JMS serializer so it was possible to define type array<int>
but I get the same error with symfony serializer.
How to reproduce
<?php
$serializer = new Serializer(
[new GetSetMethodNormalizer(), new PropertyNormalizer(), new ObjectNormalizer(), new ArrayDenormalizer()],
[new JsonEncoder()]
);
$numbers = $serializer->deserialize('["15"]', 'int[]', 'json');