Suppose I have an InputStream that contains JSON data, and I want to convert it to a Map(Key Value Pairs), so for example I can write that to a log file.
What is the easiest way to take the InputStream and convert it to a Map?
public String convertInputStreamToMap(InputStream isobj) {
// ???
}
I've tried converting to String which works as expected but when the data is really long the data will be incomplete. So I want some easiest way to directly convert this to Map.