Ivan Đorđević
05/11/2021, 9:16 AMkotlinx.serialization
doesn't have mechanisms for transformations on the descriptor (serialization) level and instead opts into transformation on the encoding level (i.e. JsonTransformingSerializer
)?
IMHO, if the former were possible, it would be possible to create transformers that would work in an encoding-agnostic manner for many formats (i.e. JSON, XML, TOML, YAML etc etc), as long as the target encoding can be represented as Map<String, Element>
/ List<Element>
where Element
is Primitive
or again `Map<String, Element>`/`List<Element>`