Details
Description
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.
Fixed in head revision. I used a JDK 1.4 compatible implementation though
Thanks!