altavir
08/16/2019, 1:35 PMMutableMap<Name, @Polymorphic T>
field, where Name
is an inline class. I have custom serializer for name. Is it possible to somehow implement a serializer for the map inheriting polymorphic behavior?Dominaezzz
08/16/2019, 1:46 PM(Name.serializer() to T.serializer()).map
.altavir
08/16/2019, 1:47 PMDominaezzz
08/16/2019, 1:48 PMName
with @Serializable(...)
I think.altavir
08/16/2019, 1:49 PMDominaezzz
08/16/2019, 1:52 PMMutableMap<@UseSerializers(....) Name, @Polymorphic T>
?altavir
08/16/2019, 1:52 PMaltavir
08/16/2019, 1:53 PMUseSerializers
could be used only on the file level and it does not helpaltavir
08/16/2019, 1:54 PMinline classes not supported
Dominaezzz
08/16/2019, 1:56 PMMutableMap<Name, @Polymorphic T>
.altavir
08/16/2019, 1:56 PMDominaezzz
08/16/2019, 1:59 PMT.serializer()
.altavir
08/16/2019, 1:59 PMDominaezzz
08/16/2019, 1:59 PMaltavir
08/16/2019, 2:00 PMaltavir
08/16/2019, 2:09 PMaltavir
08/16/2019, 2:12 PMDominaezzz
08/16/2019, 2:20 PMDecoder
to JsonInput
and just manually parse.altavir
08/16/2019, 2:22 PMName
by `String for now, since it is an internal property, but it requires a few additional conversions, which are not free (Name is not a String,but a List of Strings)sandwwraith
08/16/2019, 3:55 PM