title: JMSSerializerBundle is returning doubles as strings in JSON
body: <p>So we're using the <code>JMSSerializerBundle</code> in our Symfony2 project to generate some JSON for our clients. It's serializing our Doctrine2 entities and works like charm, with one exception. All doubles/decimal values are strings in the resulting JSON and this is confusing the clients.</p>
  
  <p>Our serialized entity looks like this, I've only pasted the relevant attributes/getters here.</p>
  
  <pre><code>class Offer
  {
      [...]
  
      /**
       * @var double $latitude
       *
       * @ORM\Column(name="latitude", type="decimal", precision=10, scale=7)
       * @Groups("offerlist")
       */
      private $latitude;
  
      /**
       * @var double $longitude
       *
       * @ORM\Column(name="longitude", type="decimal", precision=10, scale=7)
       * @Groups("offerlist")
       */
      private $longitude;
  
      [...]
  
      /**
       * Get latitude
       *
       * @return double
       */
      public function getLatitude()
      {
          return $this-&gt;latitude;
      }
  
      /**
       * Get longitude
       *
       * @return double
       */
      public function getLongitude()
      {
          return $this-&gt;longitude;
      }
  
      [...]
  }
  </code></pre>
  
  <p>The latitude/longitude values show up in the JSON like this:</p>
  
  <pre><code>{
      "latitude" : "5.3452",
      "longitude" : "54.2312"
  }
  </code></pre>
  
  <p>How do I get rid of the quotes, so it's a number in the JSON and not a string? This should be really easy, but I can't find anything in the <a href="http://jmsyst.com/bundles/JMSSerializerBundle/master/reference/annotations" rel="nofollow">docs</a> or online about this problem. Hope someone can give me a hand here!</p>