By default, Jackson tries to serialize Java Maps as JSON Objects (key/value pairs), so Map key object must be somehow serialized as a String; and there must be matching (and registered) key deserializer. Default configuration only supports a small set of JDK types (String, numbers, enum). So mapper has no idea as to how to take a String and create AutoHandlingSlotKey out of it. (in fact I am surprised that serializer did not fail for same reason)
Two obvious ways to solve this are:
- Implement and register a "key deserializer"
- Implement and register a custom deserializer for Maps.
In your case it is probably easier to do former. You may also want to implement custom key serializer, to ensure keys are serializer in proper format.
The easiest way to register serializers and deserializers is by Module interface that was added in Jackson 1.7 (and extended in 1.8 to support key serializers/deserializers).