Skip to content

Instantly share code, notes, and snippets.

@tassioauad
Created November 14, 2016 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tassioauad/8986aea20d6940e9a8b0c21e8ebf03f3 to your computer and use it in GitHub Desktop.
Save tassioauad/8986aea20d6940e9a8b0c21e8ebf03f3 to your computer and use it in GitHub Desktop.
class MeuGsonExclusionStrategy implements ExclusionStrategy {
@Override
public boolean shouldSkipField(FieldAttributes fieldAttributes) {
return fieldAttributes.getName().equals("meuatributo");
}
@Override
public boolean shouldSkipClass(Class<?> aClass) {
return aClass.getName().equals("com.example.MinhaClasse");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment