JiWon
6 years agoNew Contributor II
Get Ouptviews for a custom snap
Hi Experts,
I am developing a custom snap which connects to a Mapper. In process(Document document, String s), I get data from the Mapper and then I convert this map data to JSON object by:
Map<String, Object> inputDataFromMapper = document.get(Map.class);.
JSONObject inputDataJsonObj = new JSONObject(inputDataFromMapper);
And now I want to show this JSON object as the outputview of my custom snap by:
Document data = documentUtility.newDocument(documentUtility.newDocument(inputDataJsonObj), document);
outputViews.write(documentUtility.newDocumentFor(document, data));
However, I am getting this error in my custom snap after validating the pipeline.
Please share your ideas on how I can solve this error!