Uses of Class
com.fasterxml.jackson.core.type.TypeReference
-
Packages that use TypeReference Package Description com.fasterxml.jackson.core Main public API classes of the core streaming JSON processor: most importantlyJsonFactoryused for constructing JSON parser (JsonParser) and generator (JsonGenerator) instances.com.fasterxml.jackson.core.type Contains classes needed for type introspection, mostly used by data binding functionality.com.fasterxml.jackson.databind Basic data binding (mapping) functionality that allows for reading JSON content into Java Objects (POJOs) and JSON Trees (JsonNode), as well as writing Java Objects and trees as JSON.com.fasterxml.jackson.databind.cfg Package that contains most of configuration-related classes; exception being couple of most-commonly used configuration things (like Feature enumerations) that are at the main level (com.fasterxml.jackson.databind).com.fasterxml.jackson.databind.type -
-
Uses of TypeReference in com.fasterxml.jackson.core
Methods in com.fasterxml.jackson.core with parameters of type TypeReference Modifier and Type Method Description abstract <T> TObjectCodec. readValue(JsonParser p, TypeReference<T> valueTypeRef)Method to deserialize JSON content into a Java type, reference to which is passed as argument.<T> TJsonParser. readValueAs(TypeReference<?> valueTypeRef)Method to deserialize JSON content into a Java type, reference to which is passed as argument.abstract <T> Iterator<T>ObjectCodec. readValues(JsonParser p, TypeReference<T> valueTypeRef)Method for reading sequence of Objects from parser stream, all with same specified value type.<T> Iterator<T>JsonParser. readValuesAs(TypeReference<T> valueTypeRef)Method for reading sequence of Objects from parser stream, all with same specified value type. -
Uses of TypeReference in com.fasterxml.jackson.core.type
Methods in com.fasterxml.jackson.core.type with parameters of type TypeReference Modifier and Type Method Description intTypeReference. compareTo(TypeReference<T> o)The only reason we define this method (and require implementation ofComparable) is to prevent constructing a reference without type information. -
Uses of TypeReference in com.fasterxml.jackson.databind
Methods in com.fasterxml.jackson.databind with parameters of type TypeReference Modifier and Type Method Description JavaTypeObjectMapper. constructType(TypeReference<?> typeRef)Convenience method for constructingJavaTypeout of given type reference.<T> TObjectMapper. convertValue(Object fromValue, TypeReference<T> toValueTypeRef)ObjectReaderObjectReader. forType(TypeReference<?> valueTypeRef)Method for constructing a new reader instance that is configured to data bind into specified type.ObjectWriterObjectWriter. forType(TypeReference<?> rootType)Method that will construct a new instance that uses specific type as the root type for serialization, instead of runtime dynamic type of the root object itself.ObjectReaderObjectMapper. reader(TypeReference<?> type)Deprecated.Since 2.5, useObjectMapper.readerFor(TypeReference)insteadObjectReaderObjectMapper. readerFor(TypeReference<?> typeRef)Factory method for constructingObjectReaderthat will read or update instances of specified type<T> TObjectMapper. readValue(byte[] src, int offset, int len, TypeReference<T> valueTypeRef)<T> TObjectMapper. readValue(byte[] src, TypeReference<T> valueTypeRef)<T> TObjectMapper. readValue(JsonParser p, TypeReference<T> valueTypeRef)Method to deserialize JSON content into a Java type, reference to which is passed as argument.<T> TObjectMapper. readValue(File src, TypeReference<T> valueTypeRef)Method to deserialize JSON content from given file into given Java type.<T> TObjectMapper. readValue(InputStream src, TypeReference<T> valueTypeRef)<T> TObjectMapper. readValue(Reader src, TypeReference<T> valueTypeRef)<T> TObjectMapper. readValue(String content, TypeReference<T> valueTypeRef)Method to deserialize JSON content from given JSON content String.<T> TObjectMapper. readValue(URL src, TypeReference<T> valueTypeRef)Same asObjectMapper.readValue(java.net.URL, Class)except that target specified byTypeReference.<T> TObjectReader. readValue(JsonParser p, TypeReference<T> 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).<T> MappingIterator<T>ObjectMapper. readValues(JsonParser p, TypeReference<T> valueTypeRef)Method for reading sequence of Objects from parser stream.<T> Iterator<T>ObjectReader. readValues(JsonParser p, TypeReference<T> valueTypeRef)Convenience method that is equivalent to:ObjectReaderObjectReader. withType(TypeReference<?> valueTypeRef)Deprecated.since 2.5 UseObjectReader.forType(TypeReference)insteadObjectWriterObjectWriter. withType(TypeReference<?> rootType)Deprecated.since 2.5 UseObjectWriter.forType(TypeReference)insteadObjectWriterObjectMapper. writerFor(TypeReference<?> rootType)Factory method for constructingObjectWriterthat will serialize objects using specified root type, instead of actual runtime type of value.ObjectWriterObjectMapper. writerWithType(TypeReference<?> rootType)Deprecated.Since 2.5, useObjectMapper.writerFor(TypeReference)instead -
Uses of TypeReference in com.fasterxml.jackson.databind.cfg
Methods in com.fasterxml.jackson.databind.cfg with parameters of type TypeReference Modifier and Type Method Description JavaTypeMapperConfig. constructType(TypeReference<?> valueTypeRef)Helper method that will constructJavaTypefor given type reference This is a simple short-cut for: -
Uses of TypeReference in com.fasterxml.jackson.databind.type
Methods in com.fasterxml.jackson.databind.type with parameters of type TypeReference Modifier and Type Method Description JavaTypeTypeFactory. constructType(TypeReference<?> typeRef)
-