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

JsonOutput does not escape single char (char/Character)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.2, 2.3.0-beta-1
    • Component/s: JSON
    • Labels:
      None

      Description

      To reproduce bug:

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

        Attachments

          Activity

            People

            • Assignee:
              Guillaume Guillaume Delcroix
              Reporter:
              bura Andrey Bloschetsov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: