Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5129

groovy.json.JsonSlurper failes to parse decimal numbers correctly

    XMLWordPrintableJSON

Details

    Description

      Test.groovy
      slurper = new groovy.json.JsonSlurper()
      assert slurper.parseText('{"number": 123456.123456789}') == [number: 123456.123456789]
      
      Output
      assert slurper.parseText('{"number": 123456.123456789}') == [number: 123456.123456789]
             |       |                                         |
             |       [number:123456.125]                       false
             groovy.json.JsonSlurper@11346f77
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            jonny Jonny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: