flatten
upickle.implicits.flatten
class flatten extends StaticAnnotation
An annotation that, when applied to a field in a case class, flattens the fields of the annotated case class or Iterable into the parent case class during serialization. This means the fields will appear at the same level as the parent case class's fields rather than nested under the field name. During deserialization, these fields are grouped back into the annotated case class or Iterable.
Limitations:
- Only works with collections type that are subtypes of
Iterable[(String, _)]. - Cannot flatten more than two collections in a same level.
Attributes
- Graph
-
- Supertypes
-
trait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
In this article