I have a json object that I received by making a get API call. I make this call to receive a list of objects. It\'s a list of post... So I have an array of Post Objects.
A less than ideal solution that I found was to first decode and then encode the json data again at the node that represents the data array. For example in your case:
$json = json_decode($json);
$json = json_encode($json->data);
$serializer->deserialize($json, 'array', 'json');
There must be a better solution than this but this seems more elegant than the above solution of de-serialising json.