Packages

class defaultCase extends Annotation with StaticAnnotation

When materializing a GenCodec for sealed hierarchy with @flatten annotation, you can use this annotation on one of case classes or objects to mark it as the default one. If during deserialization the codec is unable to find the _case field and determine the case class/object to deserialize, it will try to deserialize the data to the class/object marked with this annotation.

This is useful for retaining backwards compatibility with serialized format when refactoring code and replacing a simple case class with a sealed hierarchy.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. defaultCase
  2. StaticAnnotation
  3. Annotation
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new defaultCase()
  2. new defaultCase(transient: Boolean)

    transient

    if true, the codec will also not emit the _case field during writing of default case class/object (analogous to transientDefault).

Value Members

  1. val transient: Boolean