title: Problems try encode entity to json
body: <p>im try encode an Doctrine entity as JSON string, to send as Ajax response.
  So, i check the doc: <a href="http://symfony.com/doc/current/components/serializer.html" rel="nofollow">The Serializer Component</a></p>
  
  <p>I try with this code:</p>
  
  <pre><code>$em = $this-&gt;getDoctrine()-&gt;getManager();
  // Get the entities repository
  $sesiones_registradas = $em-&gt;getRepository('AuditBundle:AuditSession')-&gt;findAll();
  
  // Instance the object
  $serializer = new Serializer(array(new JsonEncoder()),array(new GetSetMethodNormalizer()));
  
  // Convert only an item
  foreach($sesiones_registradas as $sesion){
      echo $serializer-&gt;normalize($sesion,'json');
      break;
  }
  // Stop script
  die();
  </code></pre>
  
  <p>Last code, fails saying:</p>
  
  <blockquote>
    <p>Could not normalize object of type
    AppsManantiales\AuditBundle\Entity\AuditSession, no supporting
    normalizer found.</p>
  </blockquote>
  
  <p>And if change <code>$serializer-&gt;normalize($sesion,'json')</code> by <code>$serializer-&gt;serialize($sesion, 'json');</code> The error message is:</p>
  
  <blockquote>
    <p>Serialization for the format json is not supported</p>
  </blockquote>
  
  <p>Any ideas ?.</p>