title: How to manually serialize a resource to Json in Api-Platform?
body: <p>I have a custom operation that, once called, performs some more tasks than simply adding an entity.</p>
  <p>The result of these operations is the creation of a new entity that is then persisted in the database.</p>
  <p>Now, as a return value I'm currently using the IRI of the just created entity.</p>
  <p>I generate the IRI using <code>\ApiPlatform\Core\Api\IriConverterInterface</code>.</p>
  <p>This approach works but has a drawback: in the frontend I have to issue a new call to retrieve the data of the just created entity.</p>
  <p>To avoid this call, I'd like to simply return the entity in the JSON format, but I don't find a way to immediately serialize it to return it.</p>
  <p><strong>In practice: I currently return simply the IRI of the entity: how can I return the fully serialized entity, according to its serialization configuration?</strong></p>