Forum Discussion
The error in the first post (referring to character 65279) is an encoding problem - there is a BOM in your response.You may need to add or amend your Accept/Encoding header on your request.
Once you solve your encoding problem, it should work (you don't need that JsonOutput.toJson stuff).
This assumes your actual response JSON is valid. The JSON you posted is NOT valid, because the special characters aren't escaped. Only \ and " need to be escaped as \\ and \"
"Name": "Long Name (Including Special Characters like ',-,\\,\" etc)"
But from what I understand, I think you've edited that and that's not your real response. Since you say your real response validates OK, your real response must be properly escaped or doesn't contain those characters (check the raw view in SoapUI to see if your actual JSON response is escaped, rather than the JSON view.)
JHuntThanks for your update. Could you please tell me how to add or amend the 'Accept/Encoding header' on the request as I am not an expert in this.
Also when I checked the Raw format of the file I could see some special character in the response which is not present in the JSON format response
Please note I am always selecting the encoding as 'UTF-8' in the properties. Please see below.
This is the encoding type I have selected.
Related Content
- 4 years ago
- 9 years ago
Recent Discussions
- 16 hours ago