Class JsonStream
java.lang.Object
org.springframework.boot.buildpack.platform.json.JsonStream
Utility class that allows JSON to be parsed and processed as it's received.
- Since:
- 2.3.0
- Author:
- Phillip Webb
- 
Constructor SummaryConstructorsConstructorDescriptionJsonStream(tools.jackson.databind.json.JsonMapper jsonMapper) Create a newJsonStreambacked by the given JSON mapper.
- 
Method SummaryModifier and TypeMethodDescription<T> voidget(InputStream content, Class<T> type, Consumer<T> consumer) Stream objects from the content as they become available.voidget(InputStream content, Consumer<tools.jackson.databind.node.ObjectNode> consumer) Streamobject nodesfrom the content as they become available.
- 
Constructor Details- 
JsonStreampublic JsonStream(tools.jackson.databind.json.JsonMapper jsonMapper) Create a newJsonStreambacked by the given JSON mapper.- Parameters:
- jsonMapper- the object mapper to use
- Since:
- 4.0.0
 
 
- 
- 
Method Details- 
getpublic void get(InputStream content, Consumer<tools.jackson.databind.node.ObjectNode> consumer) throws IOException Streamobject nodesfrom the content as they become available.- Parameters:
- content- the source content
- consumer- the- ObjectNodeconsumer
- Throws:
- IOException- on IO error
 
- 
getStream objects from the content as they become available.- Type Parameters:
- T- the object type
- Parameters:
- content- the source content
- type- the object type
- consumer- the- ObjectNodeconsumer
- Throws:
- IOException- on IO error
 
 
-