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

Provide a way to specify the order in which pojo fields should be serialised.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.11.0
    • Codecs
    • None

    Description

      At the moment it seems like pojo fields are always serialised in the alphabetical order. I haven't found a way to provide custom ordering without writing an encoder. The motivation here is to keep the crucial fields at the top of the document for human-readability. 

      Attachments

        Activity

          People

            john.stewart@mongodb.com John Stewart (Inactive)
            napalonyprofesor@gmail.com Daniel Warmin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: