Closed ItsBlockFighter closed 3 years ago
Have a look here: https://github.com/dieselpoint/norm#custom-serialization
You might still have to implement a type converter for each type. The system still needs to know how to serialize User. You might be able to implement some common code that works across types to make it easier.
But this still only convert one type. Basically, he's doing the same thing as the former @DbSerializable
, @DbSerializer
.
You could have your types implement an interface, maybe something with readFrom() and writeTo() methods, and then create a single converter that handled the interface.
Hi!
Is there a better way to serialize the lists? I do not always want to create a DbSerialization for each data type.