Boris Yasen
01/18/2024, 3:36 PMJSON.stringify()
but if I return html code it adds html comment and it occurs JSON.parse()
error.
This is my SL.
response.write({
output: JSON.stringify({'message':"<a href='"+csvFile.url+"'>Testing </a>"})
});
And this is my client script which parse the response.
let response = <http://https.post|https.post>({
url: scriptUrl,
body: {},
headers:{
'Content-type': 'application/x-www-form-urlencoded'
}
});
let body = JSON.parse(response.body);
And we can't parse that json body because of html comment after json.
Any help would be appreciatedIsrael Gonzalez
01/18/2024, 3:53 PMBoris Yasen
01/18/2024, 3:55 PMBoris Yasen
01/18/2024, 3:56 PMbattk
01/18/2024, 4:00 PMBoris Yasen
01/18/2024, 4:02 PMapplication/json
and application/x-www-form-urlencoded
neither of them did workbattk
01/18/2024, 4:03 PMBoris Yasen
01/18/2024, 4:03 PMbattk
01/18/2024, 4:05 PMBoris Yasen
01/18/2024, 4:06 PMbattk
01/18/2024, 4:06 PM