@Override
    public void setupModule(SetupContext context) {
      // install a modifier that prevents recursive serialization in cases where
      // there are cyclical references
      super.setupModule(context);
      context.addBeanSerializerModifier(new BeanSerializerModifier() {
        @Override
        public JsonSerializer<?> modifySerializer(
            SerializationConfig config, BeanDescription desc, JsonSerializer<?> serializer) {
          return new PreventReserializationSerializer(serializer, serializedObjects,
              serializationDepth);
        }
      });
    }
A Jackson module that installs a serializer-modifier to detect and prevent
re-serialization of objects that have already been serialized. W/o this
Jackson would throw infinite-recursion exceptions.
geode-core/src/main/java/org/apache/geode/management/internal/json/AbstractJSONFormatter.java