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

JsonOutput does not escape double quotes in map keys

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.4.1
    • None
    • JSON

    Description

      Double quotes (") should be escaped in JSON.

      JsonOutput does not perform this escaping for map keys:

      assert groovy.json.JsonOutput.toJson(['the "quoted" key':'bug']) == /{"the \"quoted\" key":"bug"}/
                                    |                                  |
                                    {"the "quoted" key":"bug"}         false
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rene.scheibe Rene Scheibe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: