Open cowtowncoder opened 9 months ago
NOTE: we do still have the question of whether to access such converters via regular "value" serializers or "key" serializers. Or, in theory, could just add new set of configuration.
But due to need to contextualize serializers, it may be better to tag these on to KeySerializer
s; meaning that lookup to obtain a converter is by finding a key serializer (of type JsonSerializer<?>
) and see that it implements ToStringConverter
(if not, cannot use).
In order to support cases of "stringified" serialization, we need to add a new interface; call it
ToStringConverter
, which can be implemented by one or both of:The idea came from
https://github.com/FasterXML/jackson-datatypes-collections/issues/135
(or rather, its serialization counterpart)
where it is necessary to support "Stringified" serialization format for structured datatype.
Similar needs probably exists for other dataformats like CSV, and perhaps Properties.
Note: for deserialization,
KeyDeserializer
already works: but unfortunately we never added matchingKeySerializer
(intead,JsonSerializer
is used, just has to writeJsonToken.FIELD_NAME
instead ofJsonToken.VALUE_STRING
.