FasterXML / jackson-datatypes-collections

Jackson project that contains various collection-oriented datatype libraries: Eclipse Collections, Guava, HPPC, PCollections
Apache License 2.0
79 stars 53 forks source link

Add deserialization support for bracket notation Range #135

Closed mukham12 closed 11 months ago

mukham12 commented 11 months ago

I am creating this issue as a formality and to enhance visibility, facilitating anyone with the time and interest to initiate work on it.

We recently incorporated support for a new serialization type for Guava Range objects. Instead of only allowing the default, more verbose serialization format, users can now opt to serialize ranges using bracket notation (interval notation). This concept was proposed in #118 and implemented in #128. In essence, users can annotate range properties with @JsonFormat(JsonFormat.Shape.STRING) to choose the serialization method described above.

Having established serialization support, the next step is to make corresponding code adjustments to enable deserialization.

Thanks.

cowtowncoder commented 11 months ago

@mukham12 I created https://github.com/FasterXML/jackson-databind/issues/4276 to help with serialization side, to have ability to actually register converters that can be used by RangeSerializer.

I am not yet sure whether these ought to be implemented by regular "value" serializers, or by "key serializers". Latter seems better in some ways (since they are deliberately added), but I could see benefits for former as well -- possibly as means to actually eventually get rid of the whole "key serializers" concept (just use "value" serializer's ToStringConverter interface)

mukham12 commented 11 months ago

Working implementation is checked in and targeted for 2.17.