Encodes a class belonging to a type hierarchy.
Decodes a class belonging to a type hierarchy.
Decodes a class belonging to a type hierarchy. Type is identified by the index in the unpicklers
sequence, so care
must be taken to ensure unpicklers are added in the same order.
Helper for registration of Pickler[B]/Unpickler[B] pairs
Facade for native JS engine provided TextDecoder
Facade for native JS engine provided TextDecoder
Facade for native JS engine provided TextEncoder
Facade for native JS engine provided TextEncoder
Create a transforming pickler that takes an object of type A
and transforms it into B
, which is then pickled.
Create a transforming pickler that takes an object of type A
and transforms it into B
, which is then pickled.
Similarly a B
is unpickled and then transformed back into A
.
This allows for easy creation of picklers for (relatively) simple classes. For example
// transform Date into Long and back implicit val datePickler = TransformPickler[java.util.Date, Long]( _.getTime, t => new java.util.Date(t))
Type of the original object
Type for the object used in pickling
Function that takes A
and transforms it into B
Function that takes B
and transforms it into A
Encodes a class belonging to a type hierarchy. Type is identified by the index in the
picklers
sequence, so care must be taken to ensure picklers are added in the same order.