Class BasicNodeReader
java.lang.Object
com.networknt.schema.serialization.BasicNodeReader
- All Implemented Interfaces:
NodeReader
Basic implementation of
NodeReader.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BasicNodeReaderprotected com.fasterxml.jackson.databind.ObjectMappergetObjectMapper(InputFormat inputFormat) Gets the object mapper for the input format.com.fasterxml.jackson.databind.JsonNodereadTree(InputStream content, InputFormat inputFormat) Deserialize content as a tree.com.fasterxml.jackson.databind.JsonNodereadTree(String content, InputFormat inputFormat) Deserialize content as a tree.
-
Constructor Details
-
BasicNodeReader
protected BasicNodeReader()
-
-
Method Details
-
getInstance
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(String content, InputFormat inputFormat) throws IOException Description copied from interface:NodeReaderDeserialize content as a tree.- Specified by:
readTreein interfaceNodeReader- Parameters:
content- the contentinputFormat- the input format- Returns:
- the node
- Throws:
IOException- IOException
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(InputStream content, InputFormat inputFormat) throws IOException Description copied from interface:NodeReaderDeserialize content as a tree.- Specified by:
readTreein interfaceNodeReader- Parameters:
content- input streaminputFormat- input format- Returns:
- the node
- Throws:
IOException- IOException
-
getObjectMapper
Gets the object mapper for the input format.- Parameters:
inputFormat- the input format- Returns:
- the object mapper
-