Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      1.5.0_01

      Description

      It would be very helpful if you could configure XStream to ignore certain fields and certain classes when outputing xml.

      For example

      public class X {
      private int v;
      }

      public class Y {
      private int w;
      private int z;
      private X x;
      }

      would generally create something like:

      <Y>
      <w>0</w>
      <z>0</z>
      <x>
      <v>0</v>
      </x>
      </Y>

      putting in the following:

      xstream.ignoreClass(X.class);
      xstream.ignoreField(Y.class, "z");

      would yield:

      <Y>
      <w>0</w>
      </Y>

        Issue Links

          Activity

          Hide
          Jörg Schaible added a comment -

          Was implemented in 1.1.3: XStream.omitField()

          Show
          Jörg Schaible added a comment - Was implemented in 1.1.3: XStream.omitField()
          Hide
          Jörg Schaible added a comment -

          Sorry, my fault. This feature is not fixed, because XSTR-68 was not implemented yet.

          Show
          Jörg Schaible added a comment - Sorry, my fault. This feature is not fixed, because XSTR-68 was not implemented yet.
          Hide
          Jörg Schaible added a comment -

          2nd try. This time xstream.omitField() should work!

          Show
          Jörg Schaible added a comment - 2nd try. This time xstream.omitField() should work!

            People

            • Assignee:
              Unassigned
              Reporter:
              Matthew Inger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: