I am making a call to splunk and then I am trying to use the ResultsReaderJson class to get my results.
InputStream results = jobSavedSearch.getResults();
ResultsReaderJson resultsReader = new ResultsReaderJson(results);
And I keep getting this error.
com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 6
I have no access to the JsonReader from this class. Does anybody have any ideas of what I can do to get around this?
You have not asked for the results stream to return you JSON. The default is XML. To fix this you could use: