Skip to content

Add default visibility implementations #164

@sdaschner

Description

@sdaschner

It would reduce boilerplate if JSON-B implementations were required to ship with some often-needed visibility strategies, such as (up for discussion):

  • PropertyNamingStrategy.PUBLIC_PROPERTY: Use public getters / setters, or public fields (if no corresponding getter / setter) for (de-)serialization. Default behavior.
  • PropertyNamingStrategy.PUBLIC_GETTER_SETTER: Use public getters / setters for (de-)serialization.
  • PropertyNamingStrategy.PUBLIC_FIELDS: Use public fields for (de-)serialization. Corresponding getters / setters that exist for the fields must be used.
  • PropertyNamingStrategy.FIELDS: Use fields (of any visibility) for (de-)serialization. Corresponding getters / setters that exist for the fields must be used.

Maybe add others as well.

For convenience, these constants should be added to the PropertyNamingStrategy interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions