I'm trying to get the JSON response of SonataUserBundle Api. So after following the config process from the Sonata HomePage docs
It looks like this API returns an empty object
It looks like you forgot to add metadata directory to jms_serializer
config.
jms_serializer:
metadata:
directories:
SonataDatagridBundle:
namespace_prefix: 'Sonata\DatagridBundle\'
path: '@SonataDatagridBundle/Resources/config/serializer'
# Also don't forget to add NewsBundle metadata too
ApplicationSonataNewsBundle:
namespace_prefix: 'Application\Sonata\NewsBundle\'
path: '@ApplicationSonataNewsBundle/Resources/config/serializer'