Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3097

Create Convention that customises which properties are set

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: POJO

      Jackson allows for finer grained control over which properties are serialized. The SET_PRIVATE_FIELDS_CONVENTION allows some flexibility by allowing private fields to be set directly. However, this could be extended to allow for greater flexibility.

      An example of the ObjectMapper api allows flexibility for controlling: getter, setter and field properties:

      mapper.setVisibility(IS_GETTER, NONE)
              .setVisibility(GETTER, NONE)
              .setVisibility(SETTER, NONE)
              .setVisibility(FIELD, ANY)
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: