title: Ruby json library convert BigDecimal to scientific notation
body: <p>I need convert a Ruby hash which contains some BigDecimal fields into JSON.</p>
  
  <p>I need the BigDecimal to be converted into Float/Integer, but the 'json' lib always convert it into the scientific notation.</p>
  
  <pre><code>require 'json'
  require 'bigdecimal'
  
  obj = {}
  obj['created_at'] = BigDecimal('0.12345')
  
  puts "JSON.dump(obj) = #{JSON.dump(obj)}"
  puts "JSON.generate(obj) = #{JSON.generate(obj)}"
  puts "JSON.fast_generate(obj) = #{JSON.fast_generate(obj)}"
  puts "JSON.pretty_generate(obj) = #{JSON.pretty_generate(obj)}"
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>JSON.dump(obj) = {"created_at":"0.12345e0"}
  JSON.generate(obj) = {"created_at":"0.12345e0"}
  JSON.fast_generate(obj) = {"created_at":"0.12345e0"}
  JSON.pretty_generate(obj) = {
    "created_at": "0.12345e0"
  }
  </code></pre>
  
  <p>Is there any JSON lib that can specify the number format so when i parsing an object, the BigDecimal field won't be converted into the scientific notation?</p>
  
  <pre><code>obj['created_at'] = BigDecimal.new('0.12345')
  JSON.parse(obj) = { "created_at": "0.12345" } # not 0.12345e0
  </code></pre>
  
  <p>I'm using ruby 2.4.1p111</p>