XStream
  1. XStream
  2. XSTR-696

Using generics with json serializer

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.3
    • Component/s: Core
    • Labels:
      None
    • JDK version and platform:
      Sun 1.7._02

      Description

      Hi,

      I don't know if I'm doing something wrong or not.

      I've a pojo as a generic container: ResultBean<E extends Serializable> , where it has a property: E bean;

      When E is an ArrayList, the output is this:

      :{"@id": "1","bean": {"@class": "list","@id": "2","org.kyrian.entity.gnomo.GnNode": {"@id": "3","nodeId": 1,"nodeTitle": "nodo 1"},"org.kyrian.entity.gnomo.GnNode": {"@id": "4","nodeId": 2,"nodeTitle": "nodo 2"}}}
      

      It has this structure: bean: node1, node 2. The desired output it will web: bean:[node1,node2]

      I'm doing something wrong?

      1. ResultBean.java
        5 kB
        Marcial Atiénzar Navarro

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Marcial Atiénzar Navarro
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: