XStream
  1. XStream
  2. XSTR-600

Problem of Generic List with Jettison Driver

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: Converters
    • Labels:
      None

      Description

      I am using xstream 1.3.1 with Jettison 1.1 to generate json. I have a generic list with a structure like such

      import xxx.xxx.A;

      List<A> aList;

      XStream xstream = new XStream(new JettisonMappedXmlDriver());
      xstream.setMode(XStream.NO_REFERENCES);
      String s=xstream.toXML(product);

      It will generate something like below

      ["List":["xxx.xxx.A":[FIRST,SECOND,...]]

      I switch to their internal JsonHierarchicalStreamDriver and the "xxx.xxx.A" level goes away

      ["List":[FIRST,SECOND,...]]

      I am not sure whether it is the problem of xstream or jettison. But I am not familiar with Jettison enough to test it. Hopefully this is useful information for someone.

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          guojun
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: