Class DefaultJsonNodeReader
java.lang.Object
com.networknt.schema.serialization.DefaultJsonNodeReader
- All Implemented Interfaces:
JsonNodeReader
Default
JsonNodeReader.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forDefaultJsonNodeReader.static classBuilder support forJsonNodeReader. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.fasterxml.jackson.databind.ObjectMapperprotected final JsonNodeFactoryFactoryprotected final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultJsonNodeReader(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper yamlMapper, JsonNodeFactoryFactory jsonNodeFactoryFactory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Gets the builder forDefaultJsonNodeReader.protected com.fasterxml.jackson.databind.ObjectMapperGets the json mapper.protected com.fasterxml.jackson.databind.ObjectMappergetObjectMapper(InputFormat inputFormat) Gets the object mapper for the input format.protected com.fasterxml.jackson.databind.ObjectMapperGets the yaml mapper.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.
-
Field Details
-
jsonMapper
protected final com.fasterxml.jackson.databind.ObjectMapper jsonMapper -
yamlMapper
protected final com.fasterxml.jackson.databind.ObjectMapper yamlMapper -
jsonNodeFactoryFactory
-
-
Constructor Details
-
DefaultJsonNodeReader
protected DefaultJsonNodeReader(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper yamlMapper, JsonNodeFactoryFactory jsonNodeFactoryFactory) Constructor.- Parameters:
jsonMapper- the json mapperyamlMapper- the yaml mapperjsonNodeFactoryFactory- the json node factory factory
-
-
Method Details
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(String content, InputFormat inputFormat) throws IOException Description copied from interface:JsonNodeReaderDeserialize content as a tree.- Specified by:
readTreein interfaceJsonNodeReader- 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:JsonNodeReaderDeserialize content as a tree.- Specified by:
readTreein interfaceJsonNodeReader- Parameters:
content- input streaminputFormat- input format- Returns:
- the node
- Throws:
IOException- IOException
-
getYamlMapper
protected com.fasterxml.jackson.databind.ObjectMapper getYamlMapper()Gets the yaml mapper.- Returns:
- the yaml mapper
-
getJsonMapper
protected com.fasterxml.jackson.databind.ObjectMapper getJsonMapper()Gets the json mapper.- Returns:
- the json mapper
-
getObjectMapper
Gets the object mapper for the input format.- Parameters:
inputFormat- the input format- Returns:
- the object mapper
-
builder
Gets the builder forDefaultJsonNodeReader.- Returns:
- the builder
-