public class JsonStream
extends java.lang.Object
| Constructor and Description |
|---|
JsonStream(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Create a new
JsonStream backed by the given object mapper. |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
get(java.io.InputStream content,
java.lang.Class<T> type,
java.util.function.Consumer<T> consumer)
Stream objects from the content as they become available.
|
void |
get(java.io.InputStream content,
java.util.function.Consumer<com.fasterxml.jackson.databind.node.ObjectNode> consumer)
Stream
object nodes from the content as they become available. |
public JsonStream(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
JsonStream backed by the given object mapper.objectMapper - the object mapper to usepublic void get(java.io.InputStream content,
java.util.function.Consumer<com.fasterxml.jackson.databind.node.ObjectNode> consumer)
throws java.io.IOException
object nodes from the content as they become available.content - the source contentconsumer - the ObjectNode consumerjava.io.IOException - on IO errorpublic <T> void get(java.io.InputStream content,
java.lang.Class<T> type,
java.util.function.Consumer<T> consumer)
throws java.io.IOException
T - the object typecontent - the source contenttype - the object typeconsumer - the ObjectNode consumerjava.io.IOException - on IO error