Skip to content

Instantly share code, notes, and snippets.

@fedotxxl
Created June 11, 2015 19:03
Show Gist options
  • Save fedotxxl/98970d8fd9ac0af08bf9 to your computer and use it in GitHub Desktop.
Save fedotxxl/98970d8fd9ac0af08bf9 to your computer and use it in GitHub Desktop.
@JsonDeserialize(converter=MyClassSanitizer.class) // invoked after class is fully deserialized
public class MyClass {
public String field1;
}
import com.fasterxml.jackson.databind.util.StdConverter;
public class MyClassSanitizer extends StdConverter<MyClass,MyClass> {
@Override
public MyClass convert(MyClass var1) {
var.field1 = munge(var.field1);
return var1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment