I'm using Symfony serializer. It works well.
use Symfony\Component\Serializer\Annotation\Groups;
/**
*
* @Groups({"default", "notification"})
*/
public function getUser()
{
...
}
Is it possible serialise property as another name?
So I want to use getUser
in framework, but property should named as profile
in serialised json.
How I can do that?