title: Symfony serializer returns string instead of float
body: <p>How can the Symfony Serializer Component be configured to normalize a float property of an object (entity)?</p>
  
  <p>In detail: the <code>taxRate</code> property of a doctrine entity is is mapped to a PHP float value. And I would like to respond from a controller with a JSON representation like:</p>
  
  <pre><code>{taxRate:0.19}
  </code></pre>
  
  <p>But what I get is</p>
  
  <pre><code>{taxRate:"0.19"}
  </code></pre>
  
  <p>The definition of the entity's property and annotations are:</p>
  
  <pre><code>class ExampleEntity {
    /**
     * @ORM\Column(type="decimal", precision=3, scale=2, nullable=true)
     * @Groups({"api"})
     */
    protected $taxRate;
  }
  </code></pre>
  
  <p>The controller looks like this:</p>
  
  <pre><code>$serializer = $this-&gt;get('serializer');
  return new JsonResponse(
    $serializer-&gt;normalize(
      $exampleEntity,
      'json',
      [
        'groups' =&gt; 'api',
      ]
    )
  );
  </code></pre>
  
  <p>I don't like the solution of converting the string into a Float on the JavaScript side. My app would like to assert the property is NULL or a Float value.</p>
  
  <p>How can this be done?</p>