[
https://jira.codehaus.org/browse/XSTR-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=298830#comment-298830
]
Joerg Schaible commented on XSTR-687:
-------------------------------------
Hi Christoph,
this looks very promising. To get a better overview I have ported XStream's
tests for the Jettison driver to your StAXON driver. Following
differences/problems catch my eye:
* numeric (and boolean ?) types are written as JSON strings (you get the type
in the overwritten startElement of the writer)
* forward slashes are not escaped (www.json.org seems to imply such a behavior)
* empty arrays/lists are not written as empty JSON arrays (Jettison fails here
also)
* invalid JSON can be generated for Externalizable types (Jettison fails here
also); it might be possible to treat Externalizables as multi-type, but then we
get:
* similar problem applies for any List with different type of elements
(Jettison fails here also), but the question ist, how to represent this in JSON
at all:
{code:XML}
<list>
<string>foo</string>
<int>42</int>
<string>bar</string>
</list>
{code}
However, thanks so far :)
Jörg
> StAXONDriver (JSON)
> -------------------
>
> Key: XSTR-687
> URL: https://jira.codehaus.org/browse/XSTR-687
> Project: XStream
> Issue Type: New Feature
> Components: IO
> Reporter: Christoph Beck
> Assignee: Joerg Schaible
> Attachments: StAXONDriver.java, StAXONDriverTest.java
>
>
> I posted this on the user-list before and was asked to create a JIRA issue...
> I am currently working on StAXON - JSON via StAX. In principle, this thing is
> similar to the well-known Jettison, however, StAXON provides a more complete
> StAX implementation and tries to avoid some of the issues people have with
> Jettison. See http://beckchr.github.com/staxon/ for more.
> As a proof of concept, I wrote a simple XStream driver for StAXON, which
> seems to work pretty well and may serve as an alternative to the existing
> JSON drivers available for XStream. I'm attaching the code with simple tests,
> so if anyone is interested?
> The code is contributed, so feel free to modify or distribute the code with
> XStream under a BSD-like license.
--
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>