cancel
Showing results for 
Search instead for 
Did you mean: 

Get Json output from Mapper snap

JiWon
New Contributor II

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?

Capture

5 REPLIES 5

DharaSP
New Contributor

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