First of all, I'm currently abroad very far for my computer till the end of the month. Until then, my help will be quite shallow.
I have a few questions:
Are the @Getter ans @Setter annotations from Lombok or something else?
Are you using Spring / Spring boot or something else? And which JSON serialisation library? (Jackson, gson, ...)
Do you have any configuration that explicitly indicate that you use getter methods for json serialisation? Or is that a default configuration of your library / framework?
A pojo like this
it won't generate the
age
field, onlybirthday
field