Forum Discussion
Hello,
If you haven’t found a solution yet, please try this.
Within the REST Get snap there is a setting called “response entity type” you can switch this from default which is like an auto mode.
TEXT mode should give you the raw text of the response, and exempt it from the parsing giving you just a string of whatever your response is.
BINARY mode will return you a binary base64 string
For your problem I suggest using the TEXT option to get a raw string and then use SnapLogic expression language string manipulation functions to remove the line invalidating your json.
Once you have removed the invalid content, you can use the eval function to parse the json string into workable objects.
- tstack9 years agoFormer Employee
Note: There is a JSON.parse() method that would be safer to use than eval.