Skip to content
New issue

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

Don't serialize properties without a setter #13

Open
Clashsoft opened this issue Jan 8, 2020 · 1 comment
Open

Don't serialize properties without a setter #13

Clashsoft opened this issue Jan 8, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request needs-discussion Issues that need to be further discussed.
Projects

Comments

@Clashsoft
Copy link
Member

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!
@Clashsoft Clashsoft added enhancement New feature or request needs-discussion Issues that need to be further discussed. labels Jan 8, 2020
@Clashsoft Clashsoft added this to the 1.2 milestone Jan 8, 2020
@Clashsoft Clashsoft self-assigned this Jan 8, 2020
@azuendorf
Copy link
Contributor

Good idea.

@Clashsoft Clashsoft added this to To do in Fulib Jan 14, 2020
@Clashsoft Clashsoft moved this from To do to Reviewer approved in Fulib Jan 15, 2020
@Clashsoft Clashsoft removed this from the v1.2.0 milestone Feb 21, 2020
@Clashsoft Clashsoft moved this from Ready to Start Work to To do in Fulib Feb 25, 2020
@Clashsoft Clashsoft moved this from To do to In progress in Fulib May 6, 2020
@Clashsoft Clashsoft moved this from In progress to Ready to Start Work in Fulib May 6, 2020
@Clashsoft Clashsoft moved this from Ready to Start Work to To do in Fulib Jun 17, 2020
Clashsoft added a commit to fujaba/fulib that referenced this issue Aug 25, 2020
They now include the typeSignature property on Attributes

Relevant: fujaba/fulibYaml#13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-discussion Issues that need to be further discussed.
Projects
No open projects
Fulib
To do
Development

No branches or pull requests

2 participants