trait ClassTagExtensions extends AnyRef
Experimental ClassTag equivalent of ScalaObjectMapper. This only works with non parameterized types or parameterized types up to 5 type parameters.
- Self Type
- ClassTagExtensions with ObjectMapper
- Alphabetic
- By Inheritance
- ClassTagExtensions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
constructType[T](implicit arg0: JavaTypeable[T]): JavaType
Convenience method for constructing com.fasterxml.jackson.databind.JavaType out of given type (typically
java.lang.Class), but without explicit context. -
def
convertValue[T](fromValue: Any)(implicit arg0: JavaTypeable[T]): T
Convenience method for doing two-step conversion from given value, into instance of given value type.
Convenience method for doing two-step conversion from given value, into instance of given value type. This is functionality equivalent to first serializing given value into JSON, then binding JSON data into value of given type, but may be executed without fully serializing into JSON. Same converters (serializers, deserializers) will be used as for data binding, meaning same object mapper configuration works.
- Exceptions thrown
IllegalArgumentExceptionIf conversion fails due to incompatible type; if so, root cause will contain underlying checked exception data binding functionality threw
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def readValue[T](src: Array[Byte], offset: Int, len: Int)(implicit arg0: JavaTypeable[T]): T
- def readValue[T](src: Array[Byte])(implicit arg0: JavaTypeable[T]): T
- def readValue[T](src: InputStream)(implicit arg0: JavaTypeable[T]): T
- def readValue[T](src: Reader)(implicit arg0: JavaTypeable[T]): T
- def readValue[T](content: String)(implicit arg0: JavaTypeable[T]): T
- def readValue[T](src: URL)(implicit arg0: JavaTypeable[T]): T
- def readValue[T](src: File)(implicit arg0: JavaTypeable[T]): T
-
def
readValue[T](jp: JsonParser)(implicit arg0: JavaTypeable[T]): T
Method to deserialize JSON content into a Java type, reference to which is passed as argument.
Method to deserialize JSON content into a Java type, reference to which is passed as argument. Type is passed using so-called "super type token" (see ) and specifically needs to be used if the root type is a parameterized (generic) container type.
-
def
readValues[T](jp: JsonParser)(implicit arg0: JavaTypeable[T]): MappingIterator[T]
Method for reading sequence of Objects from parser stream.
Method for reading sequence of Objects from parser stream. Sequence can be either root-level "unwrapped" sequence (without surrounding JSON array), or a sequence contained in a JSON Array. In either case com.fasterxml.jackson.core.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_ARRAYbut rather to the token following it.Note that com.fasterxml.jackson.databind.ObjectReader has more complete set of variants.
-
def
readerFor[T](implicit arg0: JavaTypeable[T]): ObjectReader
Factory method for constructing com.fasterxml.jackson.databind.ObjectReader that will read or update instances of specified type
-
def
readerWithView[T](implicit arg0: ClassTag[T]): ObjectReader
Factory method for constructing com.fasterxml.jackson.databind.ObjectReader that will deserialize objects using specified JSON View (filter).
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
treeToValue[T](n: TreeNode)(implicit arg0: ClassTag[T]): T
Convenience conversion method that will bind data given JSON tree contains into specific value (usually bean) type.
Convenience conversion method that will bind data given JSON tree contains into specific value (usually bean) type.
Equivalent to:
objectMapper.convertValue(n, valueClass);
- def updateValue[T](valueToUpdate: T, src: Array[Byte], offset: Int, len: Int)(implicit arg0: JavaTypeable[T]): T
- def updateValue[T](valueToUpdate: T, src: Array[Byte])(implicit arg0: JavaTypeable[T]): T
- def updateValue[T](valueToUpdate: T, src: InputStream)(implicit arg0: JavaTypeable[T]): T
- def updateValue[T](valueToUpdate: T, src: Reader)(implicit arg0: JavaTypeable[T]): T
- def updateValue[T](valueToUpdate: T, content: String)(implicit arg0: JavaTypeable[T]): T
- def updateValue[T](valueToUpdate: T, src: URL)(implicit arg0: JavaTypeable[T]): T
- def updateValue[T](valueToUpdate: T, src: File)(implicit arg0: JavaTypeable[T]): T
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
writerFor[T](implicit arg0: JavaTypeable[T]): ObjectWriter
Factory method for constructing
com.fasterxml.jackson.databind.ObjectWriterthat will serialize objects using specified root type, instead of actual runtime type of value.Factory method for constructing
com.fasterxml.jackson.databind.ObjectWriterthat will serialize objects using specified root type, instead of actual runtime type of value. Type must be a super-type of runtime type.Main reason for using this method is performance, as writer is able to pre-fetch serializer to use before write, and if writer is used more than once this avoids addition per-value serializer lookups.
-
def
writerWithView[T](implicit arg0: ClassTag[T]): ObjectWriter
Factory method for constructing com.fasterxml.jackson.databind.ObjectWriter that will serialize objects using specified JSON View (filter).
Deprecated Value Members
-
final
def
addMixin[Target, MixinSource]()(implicit arg0: ClassTag[Target], arg1: ClassTag[MixinSource]): ObjectMapper
Method to use for adding mix-in annotations to use for augmenting specified class or interface.
Method to use for adding mix-in annotations to use for augmenting specified class or interface. All annotations from
mixinSourceare taken to override annotations thattarget(or its supertypes) has.- Target
Class (or interface) whose annotations to effectively override
- MixinSource
Class (or interface) whose annotations are to be "added" to target's annotations, overriding as necessary
- Annotations
- @deprecated
- Deprecated
(Since version 2.12.2) this support in jackson-databind is moving to the MapperBuilder
-
final
def
findMixInClassFor[T](implicit arg0: ClassTag[T]): Class[_]
- Annotations
- @deprecated
- Deprecated
(Since version 2.12.2) this support in jackson-databind is moving to the MapperBuilder