XStream
  1. XStream
  2. XSTR-75

Allow removal of unwanted prefix (and perhaps postfix) from field names.

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      It would be nice if there existed a setting to strip common field name prefices (such as: , f, f, m, m_ etc) from the outputted XML element names. This would make the XML produced even more human readable. Offcourse the unmarshalling process would have to check if there exists a Java field with a field name that matches with any of the prefices.

      Example:
      Java:
      public class Person

      { private String _firstName; private String _lastName; private String _email; ... }

      XML (now):
      <_person>
      <_firstName>...</_firstName>
      <_lastName>...</_lastName>
      <_email>...</_email>
      </_person>
      XML (with this suggestion):
      <person>
      <firstName>...</firstName>
      <lastName>...</lastName>
      <email>...</email>
      </person>

        People

        • Assignee:
          Unassigned
          Reporter:
          Odd Möller
        • Votes:
          1 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: