类 JsonStream
java.lang.Object
cn.taketoday.buildpack.platform.json.JsonStream
Utility class that allows JSON to be parsed and processed as it's received.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb
-
字段概要
字段 -
构造器概要
构造器构造器说明JsonStream(ObjectMapper objectMapper) Create a newJsonStreambacked by the given object mapper. -
方法概要
修饰符和类型方法说明<T> voidget(InputStream content, Class<T> type, Consumer<T> consumer) Stream objects from the content as they become available.voidget(InputStream content, Consumer<ObjectNode> consumer) Streamobject nodesfrom the content as they become available.private <T> Tread(JsonParser parser, Class<T> type)
-
字段详细资料
-
objectMapper
-
-
构造器详细资料
-
JsonStream
Create a newJsonStreambacked by the given object mapper.- 参数:
objectMapper- the object mapper to use
-
-
方法详细资料
-
get
Streamobject nodesfrom the content as they become available.- 参数:
content- the source contentconsumer- theObjectNodeconsumer- 抛出:
IOException- on IO error
-
get
Stream objects from the content as they become available.- 类型参数:
T- the object type- 参数:
content- the source contenttype- the object typeconsumer- theObjectNodeconsumer- 抛出:
IOException- on IO error
-
read
- 抛出:
IOException
-