From user-return-8032-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Dec 13 06:08:42 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 10906 invoked from network); 13 Dec 2009 06:08:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Dec 2009 06:08:42 -0000 Received: (qmail 27645 invoked by uid 500); 13 Dec 2009 06:08:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27477 invoked by uid 500); 13 Dec 2009 06:08:39 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 27467 invoked by uid 99); 13 Dec 2009 06:08:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2009 06:08:38 +0000 X-ASF-Spam-Status: No, hits=4.9 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [195.41.46.236] (HELO pfepb.post.tele.dk) (195.41.46.236) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2009 06:08:28 +0000 Received: from pascal.widetrail.dk (0x503ed345.arcnxx11.dynamic.dsl.tele.dk [80.62.211.69]) by pfepb.post.tele.dk (Postfix) with ESMTP id 52B9AF8400E for ; Sun, 13 Dec 2009 07:07:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by pascal.widetrail.dk (Postfix) with ESMTP id 394C910A33A for ; Sun, 13 Dec 2009 07:19:01 +0100 (CET) Received: from pascal.widetrail.dk ([127.0.0.1]) by localhost (pascal.widetrail.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08713-03 for ; Sun, 13 Dec 2009 07:18:48 +0100 (CET) Received: from euler.localnet (unknown [10.10.1.201]) by pascal.widetrail.dk (Postfix) with ESMTP id C1746E3982 for ; Sun, 13 Dec 2009 07:18:48 +0100 (CET) From: =?utf-8?q?S=C3=B8ren_Hilmer?= Organization: wideTrail To: user@couchdb.apache.org Subject: Re: {"error":"bad_request","reason":"invalid UTF-8 JSON"} Date: Sun, 13 Dec 2009 07:07:13 +0100 User-Agent: KMail/1.11.2 (Linux/2.6.28-11-generic; KDE/4.2.2; i686; ; ) References: <200912121155.04377.sh@widetrail.dk> <4B23849F.2040904@lymegreen.co.uk> In-Reply-To: <4B23849F.2040904@lymegreen.co.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-00=_SSIJLKsbcepxc+a" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200912130707.14092.sh@widetrail.dk> X-Virus-Scanned: amavisd-new at widetrail.dk X-Virus-Checked: Checked by ClamAV on apache.org --Boundary-00=_SSIJLKsbcepxc+a Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable No, that is not the problem, as I wrote I get the error from Futon as well! =2D-S=C3=B8ren On Saturday 12 December 2009 12:55:11 david martin wrote: > correct > curl -X PUT > http://192.168.1.30:5984/visibox001/320097b898660a878ea81a96de9f49310 > -d '{"title":"There is Nothing Left to Lose", "artist":"Foo Fighters"}' > {"ok":true,"id":"320097b898660a878ea81a96de9f49310","rev":"1-4b39c2971c9a= d5 >4cb37e08fa02fec636"} > > > wrong > curl -X PUT > http://192.168.1.30:5984/visibox001/320097b898660a878ea81a96de9f49310 > -d '{"title":"There is Nothing Left to Lose" "artist":"Foo Fighters"}' > {"error":"bad_request","reason":"invalid UTF-8 JSON"} > > put a comma between key:value pairs and it will not be invalid > > S=C3=B8ren Hilmer wrote: > > In case it helps this is what CouchDb logs, when in debug mode (again > > this is done from futon: just doing "New Document" then "Save Document". > > > > [debug] [<0.122.0>] 'PUT' /fgdf/8786346d0f34a1fb29d7e9d49b1cd141 {1,1} > > Headers: [{'Accept',"application/json, text/javascript, */*"}, > > {'Accept-Charset',"ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3"}, > > {'Accept-Encoding',"gzip,deflate,sdch"}, > > {'Accept-Language',"en-US,en;q=3D0.8"}, > > {'Connection',"keep-alive"}, > > {'Content-Length',"42"}, > > {'Content-Type',"application/json"}, > > {'Host',"localhost:5984"}, > > {"Origin","http://localhost:5984"}, > > {'Referer',"http://localhost:5984/_utils/document.html?fgdf"}, > > {'User-Agent',"Mozilla/5.0 (X11; U; Linux i686; en-US) > > AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.260.0 Safari/532.5"}, > > {"X-Requested-With","XMLHttpRequest"}] > > [debug] [<0.122.0>] OAuth Params: [] > > [error] [<0.122.0>] attempted upload of invalid JSON > > {"_id":"8786346d0f34a1fb29d7e9d49b1cd141"} > > [info] [<0.122.0>] 127.0.0.1 - - 'PUT' > > /fgdf/8786346d0f34a1fb29d7e9d49b1cd141 400 > > [debug] [<0.122.0>] httpd 400 error response: > > {"error":"bad_request","reason":"invalid UTF-8 JSON"} > > > > --S=C3=B8ren > > > > On Saturday 12 December 2009 08:01:49 S=C3=B8ren Hilmer wrote: > >> I get this as well. I am not on Windows and I also get it from Futon > >> No matter how simple the document (_id only) I try to add from Futon it > >> reponds with that errror. > >> > >> I'am on: > >> KUbuntu Jaunty. > >> Apache CouchDB 0.11.0b889892 > >> Erlang R13B03 (erts-5.7.4) > >> > >> Any clues? > >> > >> --S=C3=B8ren > >> > >> On Tuesday 08 December 2009 15:56:28 Stefan Fischer wrote: > >>> Hi, > >>> > >>> > >>> > >>> after playing with couchdb 0.10 examples: > >>> > >>> > >>> > >>> > >>> > >>> command: > >>> > >>> curl -X PUT > >>> http://xxxx.xxx.xxx:5984/albums/6e1295ed6c29495e54cc05947f18c8af -d > >>> '{"title":"There is Nothing Left to Lose" "artist":"Foo Fighters"}' > >>> > >>> > >>> > >>> I get the following error: > >>> > >>> > >>> > >>> {"error":"bad_request","reason":"invalid UTF-8 JSON"} > >>> > >>> > >>> > >>> > >>> > >>> Whats wrong, > >>> > >>> > >>> > >>> How to fix it ? > >>> > >>> > >>> > >>> Thanks, > >>> > >>> SF =2D-=20 S=C3=B8ren Hilmer, M.Sc., M.Crypt. wideTrail Phone: +45 25481225 Pilev=C3=A6nget 41 Email: sh@widetrail.dk DK-8961 Alling=C3=A5bro Web: www.widetrail.dk --Boundary-00=_SSIJLKsbcepxc+a--