code: @SuppressWarnings("deprecation")
      public static ObjectMapper init(ObjectMapper mapper, SquigglyPropertyFilter filter) throws IllegalStateException {
          FilterProvider filterProvider = mapper.getSerializationConfig().getFilterProvider();
          SimpleFilterProvider simpleFilterProvider;
  
          if (filterProvider instanceof SimpleFilterProvider) {
              simpleFilterProvider = (SimpleFilterProvider) filterProvider;
          } else if (filterProvider == null) {
              simpleFilterProvider = new SimpleFilterProvider();
              mapper.setFilters(simpleFilterProvider);
          } else {
              throw new IllegalStateException("Unable to register squiggly filter with FilterProvider of type " + filterProvider.getClass().getName() + ".  You'll have to register the filter manually");
  
          }
  
          simpleFilterProvider.addFilter(SquigglyPropertyFilter.FILTER_ID, filter);
          mapper.addMixIn(Object.class, SquigglyPropertyFilterMixin.class);
  
          return mapper;
      }
docs: Initialize a @{@link SquigglyPropertyFilter} with a specific property filter.
  
  @param mapper the Jackson Object Mapper
  @param filter the property filter
  @return object mapper, mainly for convenience
  @throws IllegalStateException if the filter was unable to be registered