title: JSONObject converting BigDecimal to string
body: <p>So, I have a class which are having 2 BigDecimal type fields. Now whenever I do</p>
  <pre><code>JSONObject ob = JSONObject(myObjectWithBigDecimals);
  </code></pre>
  <p>I see that the <code>ob</code> has the 2 BigDecimal fields enclosed in quotes. But I want them to be in float format. This is messing up how the data is stored in my NoSql DB.</p>
  <p>This is how my class with BigDecimal fields looks like.</p>
  <pre><code>@Data
  public class MyClassWithBigDecimals {
      BigDecimal a = BigDecimal.ZERO;
      BigDecimal b = BigDecimal.ZERO;
  
      public MyClassWithBigDecimals() {
          a = a.setScale(6, RoundingMode.HALF_EVEN).stripTrailingZeros();
          b = b.setScale(6, RoundingMode.HALF_EVEN).stripTrailingZeros();
      }
  }
  </code></pre>
  <p>And this is what I see in <code>ob</code>:</p>
  <pre><code>&quot;{&quot;a&quot;:&quot;0&quot;,&quot;b&quot;:&quot;0&quot;}&quot;
  </code></pre>
  <p>I want it to be:</p>
  <pre><code>&quot;{&quot;a&quot;:0,&quot;b&quot;:0}&quot;
  </code></pre>
  <p>Thanks in advance!</p>