XStream
  1. XStream
  2. XSTR-67

Provide a way to control the order in which fields are listed

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2.2
    • Component/s: Core
    • Labels:
      None

      Description

      Fields are currently always listed in alphabetical order. In my quest to make our objects pretty-print nicer, I'd like to change the order. This can be done with converters, but it could be made more convenient.

      One possible API:

      xstream.setFieldOrder(Address.class,
      new String[]

      {"name", "address1", "address2", "city", "state", "zip"}

      )

      I'd expect that any unmentioned fields should be tacked onto the end, and specifying a field name that's not in the class should be an error.

        Issue Links

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian Slesinsky
          • Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: