Closed GoogleCodeExporter closed 9 years ago
public class YourAnnotationExclusionStrategy implements ExclusionStrategy {
public boolean shouldSkipClass(Class<?> clazz) {return false;}
public boolean shouldSkipField(FieldAttributes f) {return f.getAnnotation(YourAnnotation.class) != null;}
}
GsonBuilder().setExclusionStrategies(new YourAnnotationExclusionStrategy(), ...
Original comment by spdenne
on 13 Jun 2012 at 8:36
Let me know if there's action we should be taking here.
Original comment by limpbizkit
on 30 Jun 2012 at 3:09
I'd like a strategy like in comment #1 be implemented inside library along with
the annotation for that. It can be configurable on GsonBuilder, but should be
part of the library.
That's good it is easy to do it on my own, but purpose of using library is not
to write the stuff myself.
Original comment by tomasz.b...@pragmatists.pl
on 2 Jul 2012 at 2:35
Original issue reported on code.google.com by
tomasz.b...@pragmatists.pl
on 8 Jun 2012 at 12:41