Symfony2 serialze entity escape backslash from output
<p>Hi I am using Symfony2 for my application. I am using the serializer component.</p>

<pre><code>    $encoder = new JsonEncoder();
    $normalizer = new GetSetMethodNormalizer();

    $callback = function ($dateTime) {
        return $dateTime instanceof \DateTime
            ? $dateTime-&gt;format(\DateTime::ISO8601)
            : '';
    };

    $normalizer-&gt;setCallbacks(array('matchAStartTime' =&gt; $callback, 'matchBStartTime'=&gt; $callback, 'matchDate'=&gt; $callback));
    $normalizer-&gt;setIgnoredAttributes(array('createdAt', 'updatedAt'));
    $serializer = new Serializer(array($normalizer), array($encoder));
    $json = $serializer-&gt;serialize($entity, 'json');
</code></pre>

<p>but in the output i am having response like this:</p>

<pre><code>\"id\":1,\"matchAStatus\":\"Live\"
</code></pre>

<p>my question is how can I remove that slash in output? I know in raw php there is option for escape backslash but what can I use in Symfony?</p>