SyntaxFix
Write A Post
Hire A Developer
Questions
If your only requirement in your custom serializer is to skip serializing the name field of User, mark it as transient. Jackson will not serialize or deserialize transient fields.
name
User
[ see also: Why does Java have transient fields? ]