-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description:
Currently, the library does not support direct serialization and deserialization of Quantity objects. This limitation prevents the use of Quantity as a standalone object in endpoints, resulting in a NullPointerException. An example of the issue is shown below:
@PostMapping
public Quantity<Length> readQuantity(@RequestBody Quantity<Length> payload) {
return payload;
}The following exception is thrown:
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.BeanProperty.getType()" because "property" is null
Improvement Proposal:
I propose adding support for the direct serialization and deserialization of Quantity objects. This would allow developers to use Quantity in RESTful APIs and other contexts without wrapping it in a POJO.
Personal Experience:
I have been exploring the library and its capabilities, and I like what I have seen. However, I believe that we can improve it even more.
Implementation Offer:
If it is acceptable, I am willing to implement this feature. Please let me know if this is okay, and I will be happy to start working on it.
Thank you for considering this enhancement.