Skip to content

Annotation for explicitly ignoring properties #14

@Clashsoft

Description

@Clashsoft

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.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions