title: API/REST request. Limit a number to two fractional digits. Strings are not supported
body: <p>I am trying to make an RESTful request to an api. The endpoint needs a number (actually money value), which cannot exceed the normal fractional digits for that currency.</p>
  <p>I cannot use a String -&gt; 500 - Bad request
  If I use a double I get an error for doubles that have rounding errors (and thus to many digits).</p>
  <p>So in the end if I have a value like &quot;23.42&quot;, I need to pass this to my json as 23.42 without quaotation marks.</p>
  <p>I am using java and the original value is stored as a BigDecimal.</p>
  <p>I am using GSON if this is important</p>