Skip to content

Don't serialize properties without a setter #13

@Clashsoft

Description

@Clashsoft

In general, this does not make much sense since they just silently fail when deserializing. For example, consider the following class:

class Person {
   String firstName;
   String lastName;

   String getFirstName() { ... }
   void setFirstName(String value) { ... }
   String getLastName() { ... }
   void setLastName(String value) { ... }

   String getFullName() { return getFirstName() + getLastName() } // <-- no setter, "computed" property
}

This creates the yaml:

- p1: Person
  firstName: Bob
  lastName: Bobson
  fullName: Bob Bobson # don' want that!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestneeds-discussionIssues that need to be further discussed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions