json preprocessing fails to handle newline

XMLWordPrintable

    • Type: Problem report
    • Resolution: Won't fix
    • Priority: Trivial
    • None
    • Affects Version/s: 3.4.8
    • Component/s: Server (S)
    • None

      Steps to reproduce:

      • json value return by user parameter contains '\n' ( new line)
      • json preprocessing fails

      Result:

      Item preprocessing step #1 failed: cannot extract value from json by path "$.result": cannot parse as a valid JSON object: invalid control character in string data at: '
      ",
      "logging.configuration" : "file:/opt/jboss/logging.properties",
      

      Expected:

      the json should be correctly preprocessed

      Additional information: 

      • Sample Json file:
        # cat /tmp/json.txt
        {
          "number": 123,
          "key": "value",
          "new line": "\n"
        }
        
      • Works fine with jq
        # cat /tmp/json.txt|jq '.'
        {
          "number": 123,
          "key": "value",
          "new line": "\n"
        }
        

       

            Assignee:
            Unassigned
            Reporter:
            Ritesh Khadgaray
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: