groovy
  1. groovy
  2. GROOVY-4988

JsonSlurper fails to correctly parse strings containing some escaped character sequences

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.4, 2.0-beta-1
    • Component/s: JSON
    • Labels:
      None
    • Environment:
      Windows 7 x32 (intel)/Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
    • Number of attachments :
      2

      Description

      It seems JsonSlurper does not successfully parse serialized objects that originally contain character sequences like \n \t etc.

      1. bug_script_assert.groovy
        0.3 kB
        Tamás Lengyel
      2. bug_script.groovy
        0.3 kB
        Tamás Lengyel

        Activity

        Hide
        Guillaume Laforge added a comment -

        Could you use assert statements in your script to tell me exactly what you would want to see?

        Show
        Guillaume Laforge added a comment - Could you use assert statements in your script to tell me exactly what you would want to see?
        Hide
        Guillaume Laforge added a comment -

        I guess you'd expect assert erroneous == deserialized ?

        Show
        Guillaume Laforge added a comment - I guess you'd expect assert erroneous == deserialized ?
        Hide
        Tamás Lengyel added a comment -

        Added assert at the end of the script. Thanks.

        Show
        Tamás Lengyel added a comment - Added assert at the end of the script. Thanks.
        Hide
        Gabriel Szlechtman added a comment -

        I have another case pretty much like this one, and fails on 1.8.4. Should I reopen this bug or create a new one?

        Groovy Version: 1.8.4 JVM: 1.6.0_21 (Ubuntu Linux 11.10 32-bit)

        Show
        Gabriel Szlechtman added a comment - I have another case pretty much like this one, and fails on 1.8.4. Should I reopen this bug or create a new one? Groovy Version: 1.8.4 JVM: 1.6.0_21 (Ubuntu Linux 11.10 32-bit)
        Hide
        Guillaume Laforge added a comment -

        Please open a new one.

        Show
        Guillaume Laforge added a comment - Please open a new one.
        Hide
        Gabriel Szlechtman added a comment -

        Thanks, I've submitted bug# GROOVY-5144

        Show
        Gabriel Szlechtman added a comment - Thanks, I've submitted bug# GROOVY-5144

          People

          • Assignee:
            Cédric Champeau
            Reporter:
            Tamás Lengyel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: