|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.core.ObjectCodec com.fasterxml.jackson.databind.ObjectReader
public class ObjectReader
Builder object that can be used for per-serialization configuration of deserialization parameters, such as root type to use or object to update (instead of constructing new instance).
Uses "fluent" (or, kind of, builder) pattern so that instances are immutable
(and thus fully thread-safe with no external synchronization);
new instances are constructed for different configurations.
Instances are initially constructed by ObjectMapper
and can be
reused, shared, cached; both because of thread-safety and because
instances are relatively light-weight.
Field Summary | |
---|---|
protected DeserializationConfig |
_config
General serialization configuration settings; while immutable, can use copy-constructor to create modified instances as necessary. |
protected DefaultDeserializationContext |
_context
Blueprint instance of deserialization context; used for creating actual instance when needed. |
protected DataFormatReaders |
_dataFormatReaders
Optional detector used for auto-detecting data format that byte-based input uses. |
protected InjectableValues |
_injectableValues
Values that can be injected during deserialization, if any. |
protected JsonFactory |
_jsonFactory
Factory used for constructing JsonGenerator s |
protected JsonDeserializer<Object> |
_rootDeserializer
We may pre-fetch deserializer as soon as _valueType
is known, and if so, reuse it afterwards. |
protected ConcurrentHashMap<JavaType,JsonDeserializer<Object>> |
_rootDeserializers
Root-level cached deserializers |
protected RootNameLookup |
_rootNames
Cache for root names used when root-wrapping is enabled. |
protected FormatSchema |
_schema
When using data format that uses a schema, schema is passed to parser. |
protected boolean |
_unwrapRoot
Flag that indicates whether root values are expected to be unwrapped or not |
protected Object |
_valueToUpdate
Instance to update with data binding; if any. |
protected JavaType |
_valueType
Declared type of value to instantiate during deserialization. |
Constructor Summary | |
---|---|
protected |
ObjectReader(ObjectMapper mapper,
DeserializationConfig config)
Constructor used by ObjectMapper for initial instantiation |
protected |
ObjectReader(ObjectMapper mapper,
DeserializationConfig config,
JavaType valueType,
Object valueToUpdate,
FormatSchema schema,
InjectableValues injectableValues)
Constructor called when a root deserializer should be fetched based on other configuration. |
protected |
ObjectReader(ObjectReader base,
DeserializationConfig config)
Copy constructor used when modifying simple feature flags |
protected |
ObjectReader(ObjectReader base,
DeserializationConfig config,
JavaType valueType,
JsonDeserializer<Object> rootDeser,
Object valueToUpdate,
FormatSchema schema,
InjectableValues injectableValues,
DataFormatReaders dataFormatReaders)
Copy constructor used for building variations. |
protected |
ObjectReader(ObjectReader base,
JsonFactory f)
|
Method Summary | ||
---|---|---|
protected Object |
_bind(JsonParser jp,
Object valueToUpdate)
Actual implementation of value reading+binding operation. |
|
protected Object |
_bindAndClose(JsonParser jp,
Object valueToUpdate)
|
|
protected JsonNode |
_bindAndCloseAsTree(JsonParser jp)
|
|
protected
|
_bindAndReadValues(JsonParser p,
Object valueToUpdate)
|
|
protected JsonNode |
_bindAsTree(JsonParser jp)
|
|
protected Object |
_detectBindAndClose(byte[] src,
int offset,
int length)
|
|
protected Object |
_detectBindAndClose(DataFormatReaders.Match match,
boolean forceClosing)
|
|
protected JsonNode |
_detectBindAndCloseAsTree(InputStream in)
|
|
protected
|
_detectBindAndReadValues(DataFormatReaders.Match match,
boolean forceClosing)
|
|
protected JsonDeserializer<Object> |
_findRootDeserializer(DeserializationContext ctxt,
JavaType valueType)
Method called to locate deserializer for the passed root-level value. |
|
protected static JsonToken |
_initForReading(JsonParser jp)
|
|
protected InputStream |
_inputStream(File f)
|
|
protected InputStream |
_inputStream(URL src)
|
|
protected JsonDeserializer<Object> |
_prefetchRootDeserializer(DeserializationConfig config,
JavaType valueType)
Method called to locate deserializer ahead of time, if permitted by configuration. |
|
protected void |
_reportUndetectableSource(Object src)
|
|
protected void |
_reportUnkownFormat(DataFormatReaders detector,
DataFormatReaders.Match match)
Method called to indicate that format detection failed to detect format of given input |
|
protected Object |
_unwrapAndDeserialize(JsonParser jp,
DeserializationContext ctxt,
JavaType rootType,
JsonDeserializer<Object> deser)
|
|
protected ObjectReader |
_with(DeserializationConfig newConfig)
|
|
JsonNode |
createArrayNode()
|
|
protected DefaultDeserializationContext |
createDeserializationContext(JsonParser jp,
DeserializationConfig cfg)
Internal helper method called to create an instance of DeserializationContext
for deserializing a single root value. |
|
JsonNode |
createObjectNode()
|
|
JsonFactory |
getFactory()
|
|
JsonFactory |
getJsonFactory()
Deprecated. Since 2.1: Use getFactory() instead |
|
TypeFactory |
getTypeFactory()
|
|
boolean |
isEnabled(DeserializationFeature f)
|
|
boolean |
isEnabled(JsonParser.Feature f)
|
|
boolean |
isEnabled(MapperFeature f)
|
|
JsonNode |
readTree(InputStream in)
Method that reads content from given input source, using configuration of this reader, and binds it as JSON Tree. |
|
|
readTree(JsonParser jp)
Convenience method that binds content read using given parser, using configuration of this reader, except that content is bound as JSON tree instead of configured root value type. |
|
JsonNode |
readTree(Reader r)
Method that reads content from given input source, using configuration of this reader, and binds it as JSON Tree. |
|
JsonNode |
readTree(String json)
Method that reads content from given JSON input String, using configuration of this reader, and binds it as JSON Tree. |
|
|
readValue(byte[] src)
Method that binds content read from given byte array, using configuration of this reader. |
|
|
readValue(byte[] src,
int offset,
int length)
Method that binds content read from given byte array, using configuration of this reader. |
|
|
readValue(File src)
|
|
|
readValue(InputStream src)
Method that binds content read from given input source, using configuration of this reader. |
|
|
readValue(JsonNode src)
Convenience method for converting results from given JSON tree into given value type. |
|
|
readValue(JsonParser jp)
Method that binds content read using given parser, using configuration of this reader, including expected result type. |
|
|
readValue(JsonParser jp,
Class<T> valueType)
Convenience method that binds content read using given parser, using configuration of this reader, except that expected value type is specified with the call (instead of currently configured root type). |
|
|
readValue(JsonParser jp,
JavaType valueType)
Type-safe overloaded method, basically alias for readValue(JsonParser, ResolvedType) . |
|
|
readValue(JsonParser jp,
ResolvedType valueType)
Convenience method that binds content read using given parser, using configuration of this reader, except that expected value type is specified with the call (instead of currently configured root type). |
|
|
readValue(JsonParser jp,
TypeReference<?> valueTypeRef)
Convenience method that binds content read using given parser, using configuration of this reader, except that expected value type is specified with the call (instead of currently configured root type). |
|
|
readValue(Reader src)
Method that binds content read from given input source, using configuration of this reader. |
|
|
readValue(String src)
Method that binds content read from given JSON string, using configuration of this reader. |
|
|
readValue(URL src)
Method that binds content read from given input source, using configuration of this reader. |
|
|
readValues(byte[] src)
Overloaded version of readValue(InputStream) . |
|
|
readValues(byte[] src,
int offset,
int length)
Overloaded version of readValue(InputStream) . |
|
|
readValues(File src)
Overloaded version of readValue(InputStream) . |
|
|
readValues(InputStream src)
Method for reading sequence of Objects from parser stream. |
|
|
readValues(JsonParser jp)
Method for reading sequence of Objects from parser stream. |
|
|
readValues(JsonParser jp,
Class<T> valueType)
Convenience method that is equivalent to: |
|
|
readValues(JsonParser jp,
JavaType valueType)
Convenience method that is equivalent to: |
|
|
readValues(JsonParser jp,
ResolvedType valueType)
Convenience method that is equivalent to: |
|
|
readValues(JsonParser jp,
TypeReference<?> valueTypeRef)
Convenience method that is equivalent to: |
|
|
readValues(Reader src)
Overloaded version of readValue(InputStream) . |
|
|
readValues(String json)
Overloaded version of readValue(InputStream) . |
|
|
readValues(URL src)
Overloaded version of readValue(InputStream) . |
|
JsonParser |
treeAsTokens(TreeNode n)
|
|
|
treeToValue(TreeNode n,
Class<T> valueType)
|
|
Version |
version()
Method that will return version information stored in and read from jar that contains this class. |
|
ObjectReader |
with(Base64Variant defaultBase64)
|
|
ObjectReader |
with(DeserializationConfig config)
|
|
ObjectReader |
with(DeserializationFeature feature)
Method for constructing a new reader instance that is configured with specified feature enabled. |
|
ObjectReader |
with(DeserializationFeature first,
DeserializationFeature... other)
Method for constructing a new reader instance that is configured with specified features enabled. |
|
ObjectReader |
with(FormatSchema schema)
Method for constructing a new instance with configuration that passes specified FormatSchema to JsonParser that
is constructed for parsing content. |
|
ObjectReader |
with(InjectableValues injectableValues)
Method for constructing a new instance with configuration that uses passed InjectableValues to provide injectable values. |
|
ObjectReader |
with(JsonFactory f)
Method for constructing a new reader instance with configuration that uses passed JsonFactory for constructing underlying Readers. |
|
ObjectReader |
with(JsonNodeFactory f)
Method for constructing a new reader instance with configuration that uses passed JsonNodeFactory for constructing JsonNode
instances. |
|
ObjectReader |
with(Locale l)
|
|
ObjectReader |
with(TimeZone tz)
|
|
ObjectReader |
withFeatures(DeserializationFeature... features)
Method for constructing a new reader instance that is configured with specified features enabled. |
|
ObjectReader |
withFormatDetection(DataFormatReaders readers)
Fluent factory method for constructing a reader that will try to auto-detect underlying data format, using specified DataFormatReaders . |
|
ObjectReader |
withFormatDetection(ObjectReader... readers)
Fluent factory method for constructing a reader that will try to auto-detect underlying data format, using specified list of JsonFactory instances, and default DataFormatReaders settings
(for customized DataFormatReaders , you can construct instance yourself). |
|
ObjectReader |
withHandler(DeserializationProblemHandler h)
|
|
ObjectReader |
without(DeserializationFeature feature)
Method for constructing a new reader instance that is configured with specified feature disabled. |
|
ObjectReader |
without(DeserializationFeature first,
DeserializationFeature... other)
Method for constructing a new reader instance that is configured with specified features disabled. |
|
ObjectReader |
withoutFeatures(DeserializationFeature... features)
Method for constructing a new reader instance that is configured with specified features disabled. |
|
ObjectReader |
withRootName(String rootName)
Method for constructing a new instance with configuration that specifies what root name to expect for "root name unwrapping". |
|
ObjectReader |
withType(Class<?> valueType)
Method for constructing a new reader instance that is configured to data bind into specified type. |
|
ObjectReader |
withType(JavaType valueType)
Method for constructing a new reader instance that is configured to data bind into specified type. |
|
ObjectReader |
withType(Type valueType)
Method for constructing a new reader instance that is configured to data bind into specified type. |
|
ObjectReader |
withType(TypeReference<?> valueTypeRef)
Method for constructing a new reader instance that is configured to data bind into specified type. |
|
ObjectReader |
withValueToUpdate(Object value)
Method for constructing a new instance with configuration that updates passed Object (as root value), instead of constructing a new value. |
|
ObjectReader |
withView(Class<?> activeView)
Method for constructing a new instance with configuration that uses specified View for filtering. |
|
void |
writeValue(JsonGenerator jgen,
Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final DeserializationConfig _config
protected final DefaultDeserializationContext _context
protected final JsonFactory _jsonFactory
JsonGenerator
s
protected final boolean _unwrapRoot
protected final JavaType _valueType
_valueToUpdate
is non-null, only used for
locating deserializer.
protected final JsonDeserializer<Object> _rootDeserializer
_valueType
is known, and if so, reuse it afterwards.
This allows avoiding further deserializer lookups and increases
performance a bit on cases where readers are reused.
protected final Object _valueToUpdate
ArrayType
; array
types can not be modified because array size is immutable.
protected final FormatSchema _schema
protected final InjectableValues _injectableValues
protected final DataFormatReaders _dataFormatReaders
NOTE: If defined non-null, readValue()
methods that take
Reader
or String
input will fail with exception,
because format-detection only works on byte-sources. Also, if format
can not be detect reliably (as per detector settings),
a JsonParseException
will be thrown).
protected final ConcurrentHashMap<JavaType,JsonDeserializer<Object>> _rootDeserializers
protected final RootNameLookup _rootNames
Constructor Detail |
---|
protected ObjectReader(ObjectMapper mapper, DeserializationConfig config)
ObjectMapper
for initial instantiation
protected ObjectReader(ObjectMapper mapper, DeserializationConfig config, JavaType valueType, Object valueToUpdate, FormatSchema schema, InjectableValues injectableValues)
protected ObjectReader(ObjectReader base, DeserializationConfig config, JavaType valueType, JsonDeserializer<Object> rootDeser, Object valueToUpdate, FormatSchema schema, InjectableValues injectableValues, DataFormatReaders dataFormatReaders)
protected ObjectReader(ObjectReader base, DeserializationConfig config)
protected ObjectReader(ObjectReader base, JsonFactory f)
Method Detail |
---|
public Version version()
version
in interface Versioned
public ObjectReader with(DeserializationConfig config)
public ObjectReader with(DeserializationFeature feature)
public ObjectReader with(DeserializationFeature first, DeserializationFeature... other)
public ObjectReader withFeatures(DeserializationFeature... features)
public ObjectReader without(DeserializationFeature feature)
public ObjectReader without(DeserializationFeature first, DeserializationFeature... other)
public ObjectReader withoutFeatures(DeserializationFeature... features)
public ObjectReader with(InjectableValues injectableValues)
InjectableValues
to provide injectable values.
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader with(JsonNodeFactory f)
JsonNodeFactory
for constructing JsonNode
instances.
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader with(JsonFactory f)
JsonFactory
for constructing underlying Readers.
NOTE: only factories that DO NOT REQUIRE SPECIAL MAPPERS
(that is, ones that return false
for
JsonFactory.requiresCustomCodec()
) can be used: trying
to use one that requires custom codec will throw exception
public ObjectReader withRootName(String rootName)
DeserializationConfig.withRootName(String)
for
details.
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader with(FormatSchema schema)
FormatSchema
to JsonParser
that
is constructed for parsing content.
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader withType(JavaType valueType)
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader withType(Class<?> valueType)
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader withType(Type valueType)
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader withType(TypeReference<?> valueTypeRef)
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader withValueToUpdate(Object value)
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader withView(Class<?> activeView)
Note that the method does NOT change state of this reader, but rather construct and returns a newly configured instance.
public ObjectReader with(Locale l)
public ObjectReader with(TimeZone tz)
public ObjectReader withHandler(DeserializationProblemHandler h)
public ObjectReader with(Base64Variant defaultBase64)
public ObjectReader withFormatDetection(ObjectReader... readers)
JsonFactory
instances, and default DataFormatReaders
settings
(for customized DataFormatReaders
, you can construct instance yourself).
to construct appropriate JsonParser
for actual parsing.
Note: since format detection only works with byte sources, it is possible to get a failure from some 'readValue()' methods. Also, if input can not be reliably (enough) detected as one of specified types, an exception will be thrown.
Note: not all JsonFactory
types can be passed: specifically, ones that
require "custom codec" (like XML factory) will not work. Instead, use
method that takes ObjectReader
instances instead of factories.
readers
- Data formats accepted, in decreasing order of priority (that is,
matches checked in listed order, first match wins)
public ObjectReader withFormatDetection(DataFormatReaders readers)
DataFormatReaders
.
NOTE: since format detection only works with byte sources, it is possible to get a failure from some 'readValue()' methods. Also, if input can not be reliably (enough) detected as one of specified types, an exception will be thrown.
readers
- DataFormatReaders to use for detecting underlying format.
public boolean isEnabled(DeserializationFeature f)
public boolean isEnabled(MapperFeature f)
public boolean isEnabled(JsonParser.Feature f)
public JsonFactory getFactory()
getFactory
in class ObjectCodec
@Deprecated public JsonFactory getJsonFactory()
getFactory()
instead
getJsonFactory
in class ObjectCodec
public TypeFactory getTypeFactory()
public <T> T readValue(JsonParser jp) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
IOException
JsonProcessingException
public <T> T readValue(JsonParser jp, Class<T> valueType) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readValue
in class ObjectCodec
IOException
JsonProcessingException
public <T> T readValue(JsonParser jp, TypeReference<?> valueTypeRef) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readValue
in class ObjectCodec
IOException
JsonProcessingException
public <T> T readValue(JsonParser jp, ResolvedType valueType) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readValue
in class ObjectCodec
IOException
JsonProcessingException
public <T> T readValue(JsonParser jp, JavaType valueType) throws IOException, JsonProcessingException
readValue(JsonParser, ResolvedType)
.
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
IOException
JsonProcessingException
public <T extends TreeNode> T readTree(JsonParser jp) throws IOException, JsonProcessingException
Note: if an object was specified with withValueToUpdate(java.lang.Object)
, it
will be ignored.
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readTree
in class ObjectCodec
IOException
JsonProcessingException
public <T> Iterator<T> readValues(JsonParser jp, Class<T> valueType) throws IOException, JsonProcessingException
withType(valueType).readValues(jp);
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readValues
in class ObjectCodec
IOException
JsonProcessingException
public <T> Iterator<T> readValues(JsonParser jp, TypeReference<?> valueTypeRef) throws IOException, JsonProcessingException
withType(valueTypeRef).readValues(jp);
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readValues
in class ObjectCodec
IOException
JsonProcessingException
public <T> Iterator<T> readValues(JsonParser jp, ResolvedType valueType) throws IOException, JsonProcessingException
withType(valueType).readValues(jp);
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
readValues
in class ObjectCodec
IOException
JsonProcessingException
public <T> Iterator<T> readValues(JsonParser jp, JavaType valueType) throws IOException, JsonProcessingException
withType(valueType).readValues(jp);
NOTE: this method never tries to auto-detect format, since actual (data-format specific) parser is given.
IOException
JsonProcessingException
public <T> T readValue(InputStream src) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
IOException
JsonProcessingException
public <T> T readValue(Reader src) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
IOException
JsonProcessingException
public <T> T readValue(String src) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
IOException
JsonProcessingException
public <T> T readValue(byte[] src) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
IOException
JsonProcessingException
public <T> T readValue(byte[] src, int offset, int length) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
IOException
JsonProcessingException
public <T> T readValue(File src) throws IOException, JsonProcessingException
IOException
JsonProcessingException
public <T> T readValue(URL src) throws IOException, JsonProcessingException
withValueToUpdate(Object)
.
IOException
JsonProcessingException
public <T> T readValue(JsonNode src) throws IOException, JsonProcessingException
objectReader.readValue(src.traverse())
IOException
JsonProcessingException
public JsonNode readTree(InputStream in) throws IOException, JsonProcessingException
Note that if an object was specified with a call to
withValueToUpdate(Object)
it will just be ignored; result is always a newly constructed
JsonNode
instance.
IOException
JsonProcessingException
public JsonNode readTree(Reader r) throws IOException, JsonProcessingException
Note that if an object was specified with a call to
withValueToUpdate(Object)
it will just be ignored; result is always a newly constructed
JsonNode
instance.
IOException
JsonProcessingException
public JsonNode readTree(String json) throws IOException, JsonProcessingException
Note that if an object was specified with a call to
withValueToUpdate(Object)
it will just be ignored; result is always a newly constructed
JsonNode
instance.
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(JsonParser jp) throws IOException, JsonProcessingException
Sequence can be either root-level "unwrapped" sequence (without surrounding
JSON array), or a sequence contained in a JSON Array.
In either case JsonParser
must point to the first token of
the first element, OR not point to any token (in which case it is advanced
to the next token). This means, specifically, that for wrapped sequences,
parser MUST NOT point to the surrounding START_ARRAY
but rather
to the token following it.
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(InputStream src) throws IOException, JsonProcessingException
Sequence can be either wrapped or unwrapped root-level sequence:
wrapped means that the elements are enclosed in JSON Array;
and unwrapped that elements are directly accessed at main level.
Assumption is that iff the first token of the document is
START_ARRAY
, we have a wrapped sequence; otherwise
unwrapped. For wrapped sequences, leading START_ARRAY
is skipped, so that for both cases, underlying JsonParser
will point to what is expected to be the first token of the first
element.
Note that the wrapped vs unwrapped logic means that it is NOT
possible to use this method for reading an unwrapped sequence
of elements written as JSON Arrays: to read such sequences, one
has to use readValues(JsonParser)
, making sure parser
points to the first token of the first element (i.e. the second
START_ARRAY
which is part of the first element).
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(Reader src) throws IOException, JsonProcessingException
readValue(InputStream)
.
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(String json) throws IOException, JsonProcessingException
readValue(InputStream)
.
json
- String that contains JSON content to parse
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(byte[] src, int offset, int length) throws IOException, JsonProcessingException
readValue(InputStream)
.
IOException
JsonProcessingException
public final <T> MappingIterator<T> readValues(byte[] src) throws IOException, JsonProcessingException
readValue(InputStream)
.
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(File src) throws IOException, JsonProcessingException
readValue(InputStream)
.
IOException
JsonProcessingException
public <T> MappingIterator<T> readValues(URL src) throws IOException, JsonProcessingException
readValue(InputStream)
.
src
- URL to read to access JSON content to parse.
IOException
JsonProcessingException
public JsonNode createArrayNode()
createArrayNode
in class ObjectCodec
public JsonNode createObjectNode()
createObjectNode
in class ObjectCodec
public JsonParser treeAsTokens(TreeNode n)
treeAsTokens
in class ObjectCodec
public <T> T treeToValue(TreeNode n, Class<T> valueType) throws JsonProcessingException
treeToValue
in class ObjectCodec
JsonProcessingException
public void writeValue(JsonGenerator jgen, Object value) throws IOException, JsonProcessingException
writeValue
in class ObjectCodec
IOException
JsonProcessingException
protected Object _bind(JsonParser jp, Object valueToUpdate) throws IOException, JsonParseException, JsonMappingException
IOException
JsonParseException
JsonMappingException
protected Object _bindAndClose(JsonParser jp, Object valueToUpdate) throws IOException, JsonParseException, JsonMappingException
IOException
JsonParseException
JsonMappingException
protected JsonNode _bindAsTree(JsonParser jp) throws IOException, JsonParseException, JsonMappingException
IOException
JsonParseException
JsonMappingException
protected JsonNode _bindAndCloseAsTree(JsonParser jp) throws IOException, JsonParseException, JsonMappingException
IOException
JsonParseException
JsonMappingException
protected <T> MappingIterator<T> _bindAndReadValues(JsonParser p, Object valueToUpdate) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected static JsonToken _initForReading(JsonParser jp) throws IOException, JsonParseException, JsonMappingException
IOException
JsonParseException
JsonMappingException
protected final JsonDeserializer<Object> _findRootDeserializer(DeserializationContext ctxt, JavaType valueType) throws JsonMappingException
JsonMappingException
protected final JsonDeserializer<Object> _prefetchRootDeserializer(DeserializationConfig config, JavaType valueType)
protected Object _unwrapAndDeserialize(JsonParser jp, DeserializationContext ctxt, JavaType rootType, JsonDeserializer<Object> deser) throws IOException, JsonParseException, JsonMappingException
IOException
JsonParseException
JsonMappingException
protected Object _detectBindAndClose(byte[] src, int offset, int length) throws IOException
IOException
protected Object _detectBindAndClose(DataFormatReaders.Match match, boolean forceClosing) throws IOException
IOException
protected <T> MappingIterator<T> _detectBindAndReadValues(DataFormatReaders.Match match, boolean forceClosing) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected JsonNode _detectBindAndCloseAsTree(InputStream in) throws IOException
IOException
protected void _reportUnkownFormat(DataFormatReaders detector, DataFormatReaders.Match match) throws JsonProcessingException
JsonProcessingException
protected final DefaultDeserializationContext createDeserializationContext(JsonParser jp, DeserializationConfig cfg)
DeserializationContext
for deserializing a single root value.
Can be overridden if a custom context is needed.
protected ObjectReader _with(DeserializationConfig newConfig)
protected void _reportUndetectableSource(Object src) throws JsonProcessingException
JsonProcessingException
protected InputStream _inputStream(URL src) throws IOException
IOException
protected InputStream _inputStream(File f) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |