Groovy
  1. Groovy
  2. GROOVY-5129

groovy.json.JsonSlurper failes to parse decimal numbers correctly

    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
      

        Activity

        Jonny created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Assignee Guillaume Laforge [ guillaume ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.8.5 [ 18071 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 2.0-beta-2 [ 18072 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734053 ] Default workflow, editable Closed status [ 12745871 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971591 ] Default workflow, editable Closed status [ 12979384 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development