首页 > 解决方案 > 解析来自 REST 的压缩 InputStream

问题描述

在我的 Java 后端,我收到一个已压缩的 json 文件。

到目前为止我所拥有的是:

myMethod(InputStream inputStream) {

ZipInputStream zip = new ZipInputStream(inputStream);
JsonFactory jfactory = new JsonFactory();
JsonParser jsonParser = jfactory.createParser(zip);

jsonParser.nextToken();//i am expecting this to be "{" but this always returns null
}

我错过了什么?

标签: javajsonrestparsingzip

解决方案


推荐阅读