I believe that I already asked this question, but a lot of things changed since then. Is it possible to encapsulate serial module inside serializer, so I could fix how a class subgraph is serialized without manually adding it to a top level serial module each time I add this class to a new structure.
👀 1
v
Vsevolod Tolstopyatov [JB]
10/03/2020, 1:22 PM
you can override a decoder (with implementation via delegation) you are using in your
serialize
method and sneak any
SerializersModule
you want into it.
a
altavir
10/03/2020, 2:35 PM
You mean create custom deserializer. I think an example of such would be nice in the documentation. I also think that this particular case (hard coupling of serializaed module with serializaer) needs a separate helper function in the library.