[
https://jira.codehaus.org/browse/XSTR-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joerg Schaible resolved XSTR-696.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.x Maintenance
Not that I know that you use the JsonDriver and Jettison is not involved, I had
the chance to take a closer look. Actually it turned out that the JsonWriter
was fed by some reflection-based converters not with the actual type of the
instance, but with the type of the field holding this object. Therefore the
writer could no longer generate proper JSON for the serialized real type, that
could leed to ill-formed JSON in the worst case. Fixed in trunk.
> Using generics with json serializer
> -----------------------------------
>
> Key: XSTR-696
> URL: https://jira.codehaus.org/browse/XSTR-696
> Project: XStream
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.4.2
> Reporter: Marcial AtiƩnzar Navarro
> Assignee: Joerg Schaible
> Fix For: 1.x Maintenance
>
> Attachments: ResultBean.java
>
>
> 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:
> {code}
> :{"@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"}}}
> {code}
> It has this structure: bean: node1, node 2. The desired output it will web:
> bean:[node1,node2]
> I'm doing something wrong?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
<a
href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
</p>