@ -330,11 +330,7 @@ public class JsonPath {
notNull(jsonInputStream, "json input stream can not be null");
notNull(configuration, "configuration can not be null");
try {
return read(jsonInputStream, "UTF-8", configuration);
} finally {
Utils.closeQuietly(jsonInputStream);
}
/**
@ -72,8 +72,12 @@ public class JsonReader implements ParseContext, ReadContext {
public ReadContext parse(InputStream json, String charset) {
notNull(json, "json input stream can not be null");
notNull(json, "charset can not be null");
this.json = configuration.jsonProvider().parse(json, charset);
return this;
Utils.closeQuietly(json);
@Override