Class DefaultJsonNodeReader
java.lang.Object
com.networknt.schema.serialization.DefaultJsonNodeReader
- All Implemented Interfaces:
JsonNodeReader
Default
JsonNodeReader
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder forDefaultJsonNodeReader
.static class
Builder support forJsonNodeReader
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.fasterxml.jackson.databind.ObjectMapper
protected final JsonNodeFactoryFactory
protected final com.fasterxml.jackson.databind.ObjectMapper
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DefaultJsonNodeReader
(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.ObjectMapper
Gets the json mapper.protected com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper
(InputFormat inputFormat) Gets the object mapper for the input format.protected com.fasterxml.jackson.databind.ObjectMapper
Gets the yaml mapper.com.fasterxml.jackson.databind.JsonNode
readTree
(InputStream content, InputFormat inputFormat) Deserialize content as a tree.com.fasterxml.jackson.databind.JsonNode
readTree
(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:JsonNodeReader
Deserialize content as a tree.- Specified by:
readTree
in 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:JsonNodeReader
Deserialize content as a tree.- Specified by:
readTree
in 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
-