Can doctrine2 hydrate a new entity from an array?
Figured it out. Given a repository:
//for odm
$repo->getDocumentManager()->getHydratorFactory()->hydrate($entity, $array);
I don't know if the same can be done for ORM, but I'm currently using ODM.
You could use the Serializer Component:
$user = $serializer->deserialize($data, 'Namespace\User', 'json');
http://symfony.com/doc/current/components/serializer.html#deserializing-an-object