key

upickle.implicits.key
class key(s: String) extends StaticAnnotation

Annotation for control over the strings used to serialize your data structure. Can be applied in three ways:

  1. To individual fields, in which case it overrides the JSON object fieldname

  2. To case classes which are part of sealed traits, where it overrides the value of the "$type": "foo" discriminator field

  3. To sealed traits themselves, where it overrides the key of the "$type": "foo" discriminator field

Attributes

Graph
Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
In this article