-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Attempting to serialize a basic unit doesn't work and requires a custom serializer. It would be nice if the project provided serializers out of the box by annotating each unit with @Serializable(with = ...).
Having had a look already, it would appear to not be as easy to implement as expected due to the nature of the Units class being abstract and all the other units being open resulting in open polymorphism which would require users to register the polymorphic serializer at runtime rather than being able to use it without any setup.
To get around this, a big API change would be needed to enforce closed polymorphism which I understand would break any custom external unit implementations.
Curious to know what you think as being able to serialize a system-agnostic unit is quite useful (eg user preferences and having to convert to a base unit manually)