Class BasicNodeReader
- java.lang.Object
-
- com.networknt.schema.serialization.BasicNodeReader
-
- All Implemented Interfaces:
NodeReader
public class BasicNodeReader extends Object implements NodeReader
Basic implementation ofNodeReader.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBasicNodeReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BasicNodeReadergetInstance()protected 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.
-
-
-
Method Detail
-
getInstance
public static BasicNodeReader 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
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper(InputFormat inputFormat)
Gets the object mapper for the input format.- Parameters:
inputFormat- the input format- Returns:
- the object mapper
-
-