We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an annotation that flags properties for being ignored from yaml serialization. It would be placed on the getter.
Example:
class Person { String firstName; String lastName; String getFirstName() { ... } void setFirstName(String value) { ... } String getLastName() { ... } void setLastName(String value) { ... } @YamlIgnore // <-- String getFullName() { return getFirstName() + getLastName() } }
- p1: Person firstName: Bob lastName: Bobson
Instead of @YamlIgnore, there is already the java.beans.Transient annotation, which could have similar semantics.
@YamlIgnore
java.beans.Transient
The text was updated successfully, but these errors were encountered:
I like the solution, where we ignore properties that have no setter, more.
Sorry, something went wrong.
What about situations where there has to be a setter for legacy reasons (e.g. deprecated API)?
Clashsoft
No branches or pull requests
Add an annotation that flags properties for being ignored from yaml serialization. It would be placed on the getter.
Example:
Instead of
@YamlIgnore
, there is already thejava.beans.Transient
annotation, which could have similar semantics.The text was updated successfully, but these errors were encountered: