Test Script JSONError: Unexpected token

Hi All,

I’m new to postman and I’m requesting assistance on an issue I’m facing.

In Postman, I’m using a Qualys collection, specifically the “HLD: New, Active, Re-Open Vulnerabilities” request listed below. I have set this up correctly and works as expected.

Now, I’d like to export the results of the request to a .txt file on my local Win computer.

I was looking at a post here and from stackoverflow and decided to give this a try.

I followed the steps from stackoverflow and I’m getting the error message below:

From my understanding, the JSON is complaining about a line in the XML response. Below is a snippet of the response with the line that it’s complaining about.

I also tried changing the response output to CSV and I’m getting the same issue below:

Can I get help on fixing this?

Hi @Nina_G,

you can parse the xml to json by using xml2Json(). See video How to parse XML responses in Postman - YouTube