*/
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
throws JsonMappingException
{
JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
/*
JavaType enumType = typeHint.containedType(0);
if (enumType == null) {
enumType = visitor.getProvider().constructType(Object.class);
}
*/
JavaType valueType = typeHint.containedType(1);
if (valueType == null) {
valueType = visitor.getProvider().constructType(Object.class);
}
JsonSerializer<Object> ser = _valueSerializer;
// Class<Enum<?>> enumClass = (Class<Enum<?>>) enumType.getRawClass();
for (Map.Entry<?,SerializedString> entry : _keyEnums.internalMap().entrySet()) {
String name = entry.getValue().getValue();
// should all have the same type, so:
if (ser == null) {
ser = visitor.getProvider().findValueSerializer(entry.getKey().getClass(), _property);
}
objectVisitor.property(name, (JsonFormatVisitable) ser, valueType);
}
}