com.rallyhealth.weepickle.v1.implicits

Members list

Type members

Classlikes

trait DefaultFroms extends MacroImplicits, Generated, LowPriFroms

Attributes

Supertypes
trait LowPriFroms
trait Generated
trait Types
trait MacroImplicits
trait CaseClassFromPiece
trait CaseClassToPiece
trait MacrosCommon
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Froms
Self type
Annotator
trait DefaultTos extends MacroImplicits, Generated

Attributes

Supertypes
trait Generated
trait Types
trait MacroImplicits
trait CaseClassFromPiece
trait CaseClassToPiece
trait MacrosCommon
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Tos
Self type
Annotator
trait Froms extends DefaultFroms

Attributes

Supertypes
trait DefaultFroms
trait LowPriFroms
trait Generated
trait Types
trait MacroImplicits
trait CaseClassFromPiece
trait CaseClassToPiece
trait MacrosCommon
class Object
trait Matchable
class Any
Show all
Self type
Annotator
trait Generated extends Types

Auto-generated picklers and unpicklers, used for creating the 22 versions of tuple-picklers and case-class picklers

Auto-generated picklers and unpicklers, used for creating the 22 versions of tuple-picklers and case-class picklers

Attributes

Supertypes
trait Types
class Object
trait Matchable
class Any
Known subtypes
trait DefaultFroms
trait Froms
trait DefaultTos
trait Tos
trait LowPriFroms

This needs to be split into a separate trait due to https://github.com/scala/bug/issues/11768

This needs to be split into a separate trait due to https://github.com/scala/bug/issues/11768

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait DefaultFroms
trait Froms
Self type
Types
trait MacrosCommon

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Tos extends DefaultTos

Attributes

Supertypes
trait DefaultTos
trait Generated
trait Types
trait MacroImplicits
trait CaseClassFromPiece
trait CaseClassToPiece
trait MacrosCommon
class Object
trait Matchable
class Any
Show all
Self type
Annotator
case class discriminator(propertyName: String) extends StaticAnnotation

Defines the name of a new field (not defined in the class itself) to serve as the discriminator property name for identifying subclasses.

Defines the name of a new field (not defined in the class itself) to serve as the discriminator property name for identifying subclasses.

For naming, consider that some implementations (e.g. vpack) may sort object keys, so symbol prefixes work well for ensuring the tag is the first property. Tos will fast path if this is the first field of the object. Otherwise, Tos will have to buffer the content and find the tag later.

You can also tag the subclasses with key to override values for this field, which will otherwise default to the FQCN of the classname.

Attributes

See also
Supertypes
trait Serializable
trait Product
trait Equals
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all
class dropDefault extends StaticAnnotation

If the value of the annotated field .equals() the default value at runtime, then the macro-generated From will omit both the key and value from the serialized blob.

If the value of the annotated field .equals() the default value at runtime, then the macro-generated From will omit both the key and value from the serialized blob.

==Example==

case class FooDefault(
  @dropDefault i: Int = 10,
  @dropDefault s: String = "lol"
)

write(FooDefault(i = 11, s = "lol"))  ==> """{"i":11}"""
write(FooDefault(i = 10, s = "lol"))  ==> """{}"""
write(FooDefault())                   ==> """{}"""

Attributes

Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
case class key(s: String) extends StaticAnnotation

May be used on either:

May be used on either:

  1. subclasses to override discriminator values (default: FQCN)
  2. class fields to override field name.

Attributes

See also
Supertypes
trait Serializable
trait Product
trait Equals
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all