Open k1ng-maus opened 4 months ago
I am not sure if I understand your intention correctly. IMO the Bottle should have a property with a Quantity type and not derive from a Quantity class. There should only be one implementation of the Quantity Type, which is the NumberedQuantity.
Could you elaborate your use case a little bit more, please?
Description: Currently, the serialization of
Quantity
objects in the library always displays the unit based on its class, as defined by the customSystemOfUnits
. This can be limiting and less readable, especially when the symbol of the unit is more meaningful.Here is an example of the current behavior with the relevant code snippets:
Here is a sample DTO and controller:
In this example, the serialization always displays the unit based on the class, which can be less intuitive.
Improvement Proposal: I propose enhancing the serializer to print the unit using its symbol instead of its class, if possible. This would make the serialized output more readable and meaningful.
Example of the Desired Behavior: When serialized, the
Quantity
object should use the unit symbol:This change would enhance usability, especially when dealing with various custom units.
Implementation Offer: I am willing to implement this feature if it is acceptable. Please let me know if this proposal is approved, and I will start working on the implementation.
Thank you for considering this enhancement.