Jackson provides a small set of default KeyDeserializers (and
serializers) out of the box, but they tend to be for scalar values.
Structured types (like POJOs, Collections etc) are not supported both
since they were less commonly used as keys and since there
is no obvious simple way to express these as simple String (but many
possible ways to define a "sub-format" as in your case).
So what you are doing is probably a good way to go about it. If you
can think of a general way we are always open to PRs,
of course. And maybe others have some ideas to share wrt how you go about it.
-+ Tatu +-