couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michiel Meeuwissen (JIRA)" <>
Subject [jira] [Updated] (COUCHDB-1624) CouchDB shouldn't accept or serve JSON with control-characters
Date Fri, 07 Dec 2012 22:31:21 GMT


Michiel Meeuwissen updated COUCHDB-1624:


The following java program demonstrates the problem.

git clone
cd svenson

michiel@belono:/tmp/svenson$ javac -classpath ./bin/svenson-1.4.1.jar
michiel@belono:/tmp/svenson$ java -classpath .:./bin/svenson-1.4.1.jar:./lib/compile/slf4j-api-1.6.1.jar
Test /tmp/10571721.json
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
Exception in thread "main" org.svenson.JSONParseException: Illegal control character 0x93
        at org.svenson.tokenize.JSONTokenizer.parseString(
        at org.svenson.JSONParser.parseObjectInto(
        at org.svenson.JSONParser.parseArrayInto(
        at org.svenson.JSONParser.parseObjectInto(
        at org.svenson.JSONParser.parse(
        at org.svenson.JSONParser.parse(
        at Test.main(


> CouchDB shouldn't accept or serve JSON with control-characters
> --------------------------------------------------------------
>                 Key: COUCHDB-1624
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Nils Breunese
>         Attachments: 10571721.json,
> According to control-characters are not valid characters in JSON.
Due to a character encoding bug one of our applications was sending JSON with control-characters
to CouchDB. CouchDB happily accepts this (invalid) JSON and also serves it, but then we started
getting problems in a client that uses the Svenson JSON library which (correctly) complains
about invalid characters in the JSON served by CouchDB.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message