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:
-
To individual fields, in which case it overrides the JSON object fieldname
-
To
case classes which are part ofsealed traits, where it overrides the value of the"$type": "foo"discriminator field -
To
sealed traits themselves, where it overrides the key of the"$type": "foo"discriminator field
Attributes
- Graph
-
- Supertypes
-
trait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
In this article