caelum/vraptor4 — pull request #763 by renatorroliveira (2014-08-27 06:55:21+00:00)
Title: Creating new annotation to exclude beans fields and classes from the GSON Serialization

This is a feature that is extremely desirable.
Creating an annotation (@GsonOmitField) that marks a field or a class to be skipped at the JSON serialization reduces a lot the duplication of exclude() calls in some cases.
Imagine a User model where are some private information like password and phone number stored.
Today you have to add a .exclude() call for those fields every time you want to serialize a user object.
With this feature, you just annotate those fields with @GsonOmitField and the job is done, you don't need to worry about those informations ending up at the client side.

It is a very simple implementation and adds a wonderful feature.