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

[Jackson-3] Proposal for Renaming of properties for Naming Symmetry #70

Open
JooHyukKim opened this issue Jul 20, 2024 · 2 comments
Open

Comments

@JooHyukKim
Copy link
Member

JooHyukKim commented Jul 20, 2024

Proposal

I propose the following naming schema to provide a clear and consistent structure:

  • Writer suffix for serialization classes
  • Reader suffix for deserialization classes

Serialization Side

  • PropertyWriter remains the same
  • BeanPropertyWriter remains the same
  • AnyGetterWriter -> AnyGetterPropertyWriter

Deserialization Side

  • SettableBeanProperty -> PropertyReader
  • ObjectIdValueProperty -> ObjectIdValuePropertyReader
  • CreatorProperty -> CreatorPropertyReader
  • SettableAnyProperty -> AnySetterPropertyReader

Example Class Hierarchy

Current (AS-IS)

  • PropertyWriter -> BeanPropertyWriter -> AnyGetterWriter
  • SettableBeanProperty -> ObjectIdValueProperty / CreatorProperty -> SettableAnyProperty

Proposed (TO-BE)

  • PropertyWriter -> BeanPropertyWriter -> AnyGetterPropertyWriter
  • PropertyReader -> ObjectIdValuePropertyReader / CreatorPropertyReader -> AnySetterPropertyReader

Benefits

  • Improved consistency and symmetry in class names
  • Easier understanding of the codebase

Note

We will talk along the way the classes that are not mentioned here, yet.

@JooHyukKim JooHyukKim changed the title Proposal for Renaming of properties for Naming Symmetry [Jackson-3] Proposal for Renaming of properties for Naming Symmetry Jul 20, 2024
@cowtowncoder
Copy link
Member

I like this idea. I think I'd like to get FasterXML/jackson-databind#4396 merged before this, but we can proceed with renaming right after (technically it is not strictly necessary to order things this way but might be slightly less problem merging).

@JooHyukKim
Copy link
Member Author

I like this idea. I think I'd like to get FasterXML/jackson-databind#4396 merged before this, but we can proceed with renaming right afte

Sounds good to me ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants