title: Symfony2 custom json serialization
body: <p>I am wondering how I can personify the default JSON serialization with JMS on entities.</p>
  
  <p>I have an object A that have a OneToMany relation with an object B.<br>
  I expose the object B and attrA from A object.</p>
  
  <p>But instead of having the basic JSON</p>
  
  <pre><code>{'attrA' : 'foo', 'Bs' : {{'attrB' : 'bar'}, {'attrB' : 'baz'}, ...} }
  </code></pre>
  
  <p>I want to have</p>
  
  <pre><code>{'attrA' : 'foo', 'Bs' : {'bar', 'baz', ...}}
  </code></pre>
  
  <p>Is it possible to do that?</p>