FasterXML / FasterXML/jackson-databind

Add new tag-on interface, `ToStringConverter` for "Key Serializers" to implement

Open
#4,276 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.7k
Forks
1.5k
Avg merge
3d 6h
Merged PRs (30d)
28

Description

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:

1. Value serializers
2. Key serializers

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 matching `KeySerializer` (intead, `JsonSerializer` is used, just has to write `JsonToken.FIELD_NAME` instead of `JsonToken.VALUE_STRING`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.