Try this
in your controller
$entity = $this->getEntity($id);
$context = new SerializationContext();
$context->setSerializeNull(true);
$serializer = $this->get('jms_serializer');
$response = new Response($serializer->serialize($entity, 'json', $context));
$response->headers->set('Content-Type', 'application/json');
return $response;
But the interaction with the fosrestbundle about configs is not known to me.