groovy
  1. groovy
  2. GROOVY-5129

groovy.json.JsonSlurper failes to parse decimal numbers correctly

    Details

    • Testcase included:
      yes
    • Number of attachments :
      0

      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
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Guillaume Laforge
            Reporter:
            Jonny Heggheim
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: