trait ObjectCodec[T] extends GenObjectCodec[T] with NullSafeCodec[T]
Convenience base class for GenCodec
s that serialize values as objects.
NOTE: if you need to implement a custom GenCodec
that writes an object, the best way to do it is to have
manually implemented apply
and unapply
in companion object or by using GenCodec.fromApplyUnapplyProvider.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- ObjectCodec
- NullSafeCodec
- GenObjectCodec
- GenCodec
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
-
abstract
def
nullable: Boolean
- Definition Classes
- NullSafeCodec
-
abstract
def
readObject(input: ObjectInput): T
- Definition Classes
- ObjectCodec → GenObjectCodec
-
abstract
def
writeObject(output: ObjectOutput, value: T): Unit
- Definition Classes
- ObjectCodec → GenObjectCodec
Concrete Value Members
-
final
def
read(input: Input): T
Deserializes a value of type
T
from an Input.Deserializes a value of type
T
from an Input.- Definition Classes
- NullSafeCodec → GenCodec
-
final
def
readNonNull(input: Input): T
- Definition Classes
- ObjectCodec → NullSafeCodec
-
final
def
transform[U](onWrite: (U) ⇒ T, onRead: (T) ⇒ U): GenCodec[U]
Transforms this codec into a codec of other type using a bidirectional conversion between the original and new type.
Transforms this codec into a codec of other type using a bidirectional conversion between the original and new type.
- Definition Classes
- GenCodec
-
final
def
write(output: Output, value: T): Unit
Serializes a value of type
T
into an Output.Serializes a value of type
T
into an Output.- Definition Classes
- NullSafeCodec → GenCodec
-
final
def
writeNonNull(output: Output, value: T): Unit
- Definition Classes
- ObjectCodec → NullSafeCodec