couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fedor Indutny (JIRA)" <>
Subject [jira] Commented: (COUCHDB-1057) Wrong JSON parser behavior on escaped unicode characters
Date Thu, 03 Feb 2011 16:55:28 GMT


Fedor Indutny commented on COUCHDB-1057:

2.5.  Strings

 Any character may be escaped.  If the character is in the Basic
   Multilingual Plane (U+0000 through U+FFFF), then it may be
   represented as a six-character sequence: a reverse solidus, followed
   by the lowercase letter u, followed by four hexadecimal digits that
   encode the character's code point.  The hexadecimal letters A though
   F can be upper or lowercase.  So, for example, a string containing
   only a single reverse solidus character may be represented as

Looks like (U+0000 through U+FFFF) is declared valid for JSON in RFC

> Wrong JSON parser behavior on escaped unicode characters
> --------------------------------------------------------
>                 Key: COUCHDB-1057
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 1.0
>         Environment: Ubuntu 10.10
> Doesn't matter
>            Reporter: Fedor Indutny
> Try to save following doc to couchdb:
> { "_id" : "json-test", "test": "\u0080-\uffff"}
> And then put it to the database:
> curl -X PUT -d @1.json --basic --user admin:admin -H "Content-Type: application/json"
> You'll get error:
> {"error":"bad_request","reason":"invalid UTF-8 JSON"}
> jsonlint ( ) says that it's a valid JSON

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message