XStream

JSON mall-format with JsonHierarchicalStreamDriver

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.3
  • Fix Version/s: 1.3.1
  • Component/s: IO
  • Labels:
    None
  • JDK version and platform:
    1.6 windows

Description

the json output is not valid
see xml output for comparition

The output of json

{"org.ave7.core.model.forum.ForumAttachment": {
"id": 3,
"fileName": "!ave7_allo_mo2.rar",
"fileSize": 7859,
"userId": 12,
"uploadTime": { "@class": "sql-timestamp""2006-03-07 21:08:31.0"},
"suffix": "rar"
}}

the output xml

<org.ave7.core.model.forum.ForumAttachment>
<id>3</id>
<fileName>!ave7_allo_mo2.rar</fileName>
<fileSize>7859</fileSize>
<userId>12</userId>
<uploadTime class="sql-timestamp">2006-03-07 21:08:31.0</uploadTime>
<suffix>rar</suffix>
</org.ave7.core.model.forum.ForumAttachment>

Activity

Hide
Ryan X.Wong added a comment -

When Using JettisonMappedXmlDriver
the output is
{"org.ave7.core.model.forum.ForumAttachment":{"id":3,"fileName":"!ave7_allo_mo2.rar","fileSize":7859,"userId":12,"uploadTime":{"@class":"sql-timestamp","$":"2006-03-07 21:08:31.0"},"suffix":"rar"}}

Show
Ryan X.Wong added a comment - When Using JettisonMappedXmlDriver the output is {"org.ave7.core.model.forum.ForumAttachment":{"id":3,"fileName":"!ave7_allo_mo2.rar","fileSize":7859,"userId":12,"uploadTime":{"@class":"sql-timestamp","$":"2006-03-07 21:08:31.0"},"suffix":"rar"}}
Hide
Joerg Schaible added a comment -

Hi Ryan,

this is fixed in the head revision now, XStream will also write a $ member now.

  • Jörg
Show
Joerg Schaible added a comment - Hi Ryan, this is fixed in the head revision now, XStream will also write a $ member now.
  • Jörg
Hide
Joerg Schaible added a comment -

Set correct fix version.

Show
Joerg Schaible added a comment - Set correct fix version.
Hide
Joerg Schaible added a comment -

Fixed for upcoming release.

Show
Joerg Schaible added a comment - Fixed for upcoming release.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: