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

JsonOutput does not escape single char (char/Character)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.2, 2.3.0-beta-1
    • JSON
    • None

    Description

      To reproduce bug:

      assert JsonOutput.toJson('"') == '"\\""'
      assert JsonOutput.toJson('"' as char) == '"\\""'
      
      Assertion failed:
      
      assert JsonOutput.toJson('"' as char) == '"\\""'
                        |                   |
                        """                 false
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            bura Andrey Bloschetsov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: