JSON parser Error
Summary
Parsing BIP Response with JSON.parseContent
Hi Experts,
I'm dealing with the following issue.
I have an action chain that executes a REST Integration (via OIC), that returns a BIP from ERP.
After that, with the response from the REST Integration call, we invoke the following javascript function (In order to parse the response into the format we want)
AppModule.prototype.transmuteResultData = function(jsonAsString) {
var transmuteData = {};
if (jsonAsString && typeof jsonAsString == 'string') {
transmuteData = JSON.parse(jsonAsString);
}
return transmuteData;
};
The problem is that whenever the response is a very long string, the JSON.parse fails.
Error: SyntaxError: Unexpected token S in JSON at position 57481