History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-411
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Joerg Schaible
Reporter: Stefan Fleiter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XStream

JSON is not escaped according to RFC 4627 in JsonHierarchicalStreamDriver

Created: 26/Jun/07 08:07 AM   Updated: 25/Feb/08 05:01 PM
Component/s: IO
Affects Version/s: 1.2.2
Fix Version/s: 1.3

File Attachments: 1. Text File xstream_json_escaping.patch (7 kb)


JDK version and platform: Sun 1.6.0 update1 Linux


 Description  « Hide
JSON is not escaped according to RFC 4627 when using the JsonHierarchicalStreamDriver.

Object values and even valid Java Identifier (field names) can contain
characters which have to be escaped (see RFC 4627 and JLS), the original
code escaped only object values and not identifier names.
Furthermore only '"' and '\\' were escaped which is not enough.
Unicode code positions \u0000 to \u001f need to be escaped, too.
See attached patch.

JettisonMappedXmlDriver did not have this bug, I added a testcase very similar to that of JsonHierarchicalStreamDriver though.


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Joerg Schaible - 12/Feb/08 05:26 PM
Fixed in head revision. I used a JDK 1.4 compatible implementation though ;-)
Thanks!

Joerg Schaible - 25/Feb/08 05:01 PM
Closing issues before next release.