class JacksonKeyConvertor implements Function<Object, Object> {

    public static final JacksonKeyConvertor INSTANCE = new JacksonKeyConvertor();

    private static ObjectMapper objectMapper = new ObjectMapper();

    @Override
    public Object apply(Object originalKey) {<FILL_FUNCTION_BODY>}

}

        if (originalKey == null) {
            return null;
        }
        if (originalKey instanceof CharSequence) {
            return originalKey.toString();
        }
        try {
            return objectMapper.writeValueAsString(originalKey);
        } catch (JsonProcessingException e) {
            throw new CacheEncodeException("jackson key convert fail", e);
        }
    
<no_super_class>