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

        Guillaume Laforge made changes -
        Field Original Value New Value
        Assignee Guillaume Laforge [ guillaume ]
        Guillaume Laforge made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0-beta-2 [ 18072 ]
        Fix Version/s 1.8.5 [ 18071 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: