Use controller pattern and symfony serializer