06-03-2020 02:53 AM
Hi, I am trying to get the output of the Mapper in my custom snap.
How should I write the code in my custom snap to get the Json object from the Mapper?
05-07-2021 02:47 PM
Were you able to successfully get the JSON output ?
I am facing similar issue: Developing a custom SNAP that makes HTTP request and gets JSON response in return. The response is array of objects. In order to right it to document , currently it only shows up if I convert the response to string in following manner:
Map<String, Object> data = new LinkedHashMap<>();
data.put(“Response”, response);
outputViews.write(documentUtility.newDocumentFor(document, data));
But I’d like to instead preview the response in standard json format in outputview. Any idea how this can be achieved ? Any help would be appreciated . Thank you