-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
In v2.9.6, I needed to have the NumberSerializers.FloatSerializer customized so as to remove the trailing float 0 after the decimal separator when the value is actually an integer, because I could not find a way to configure the Jackson serializer so. Example: I want the "1.0" value to be serialized as "1" and not "1.0".
Hence, I wanted to inherit from the NumberSerializers.FloatSerializer class, so as to overload the JsonSerializer.serialize(Object value, JsonGenerator generator, SerializerProvider provider) method, but discovered that:
- the
NumberSerializers.Baseclass is protected ; - the
NumberSerializers.FloatSerializeris final.
Would it be possible to make the NumberSerializers.Base class public and the NumberSerializers.FloatSerializer not final, please?
Indeed, this would make the number serializer more open and prevent from copy/pasting the NumberSerializers.Base code when writing a number serializer which overloads the default behavior.