Edward Taylor
03/22/2020, 11:39 PM{
fooProp1,
fooProp2,
barProp1,
barProp2
}
And I'm structuring more OO in Kotlin, such as:
data class MyThing(val prop1: String, val prop2: String)
data class Combined(val foo: MyThing, val bar: MyThing)
The data structures have a lot more repetition than shown in this example so it would be great to find something where I can take the automatically generated serializers and simply tell the combined deserializer to deserialize MyThing by prepending the name of its property name. This would probably be done in the Combined serializer, maybe giving it a modified decoder instance or something?
We're wanting to target K/N in the future so want to avoid reflection, currently I'm using reflection in a custom Serializer class which iterates over the reflected object properties and uses those to figure out the keys.
Any direction would be helpful, I just can't seem to figure out this usecase of wanting to extend the generated serializers, documentation or an article would help too.Dominaezzz
03/23/2020, 1:09 AMJsonTransformingSerializer
to tranform the json to something nicer to parse.