FieldSerializer

case class FieldSerializer[A](serializer: PartialFunction[(String, Any), Option[(String, Any)]], deserializer: PartialFunction[JField, JField], includeLazyVal: Boolean)(mf: ClassTag[A])

Serializer which serializes all fields of a class too.

Serializer which serializes all fields of a class too.

Serialization can be intercepted by giving two optional PartialFunctions as constructor parameters:

FieldSerializer[WildDog](
 renameTo("name", "animalname") orElse ignore("owner"),
 renameFrom("animalname", "name")
)

The third optional parameter "includeLazyVal" determines if serializer will serialize/deserialize lazy val fields or not.

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Implicits

Implicits

implicit val mf: ClassTag[A]