/** * Call this method with an {@link ObjectMapper} to configure the object * mapper to use this {@link SimpleClassNameIdResolver}. * * @param mapper the object mapper to configure. */ public static void configureObjectMapper(final ObjectMapper mapper) { mapper.setAnnotationIntrospector(new DelegatingAnnotationIntrospector.Builder() .add(new SimpleClassNameIdResolverAnnotation()) .build()); mapper.registerModule(SimpleClassSerializer.getModule()); }