Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 13726 invoked from network); 15 Nov 2010 09:31:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Nov 2010 09:31:56 -0000 Received: (qmail 31645 invoked by uid 500); 15 Nov 2010 09:32:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 31458 invoked by uid 500); 15 Nov 2010 09:32:25 -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 31450 invoked by uid 99); 15 Nov 2010 09:32:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Nov 2010 09:32:25 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wernwa@googlemail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Nov 2010 09:32:19 +0000 Received: by bwz4 with SMTP id 4so4870029bwz.11 for ; Mon, 15 Nov 2010 01:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=Uh3XGpW4pYrJGTfneYbe4of7JcybuzSDRarQkKiak5s=; b=I6RMOt98JFN8iIwAtJ299/dpd2kihxhZsQPBOtlZ9q2Aw6ammFjSWByC3EckcVhm7M aZaIbnnIka0DAAAhWDGYMzU1F6gWqkt7Ty0As1efhTgSeqdojJ4ALlO5nRHfoTRW7XnS hvXC+MB77AFa0AkgOrq97mASlvjkwz1+75/aY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BXUcgWOurLeQKpvaide2Fr6SX4nNxgg7c204D3HhcwCmBSiSdm5eRKoxUhHCnx5Xsv WwVaWUXUsOG+BHe2LhS/MZNTH8xPvKaEu62kL3bSKkahqW7aT28DKR5YApnBrzurB6oA hR+a28VxN/cZr+SGVUckS30YGhRg1SRC4dWfU= MIME-Version: 1.0 Received: by 10.204.62.17 with SMTP id v17mr5841867bkh.67.1289813517650; Mon, 15 Nov 2010 01:31:57 -0800 (PST) Received: by 10.204.58.71 with HTTP; Mon, 15 Nov 2010 01:31:57 -0800 (PST) In-Reply-To: References: Date: Mon, 15 Nov 2010 10:31:57 +0100 Message-ID: Subject: Re: jquery-ajax encodeURI Problems From: Walter Werner To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 hi Randall You where absolutely right, with double quotes "foo" it works now. And i thought it has something to do with couchdb does not understand url-encoding characters. let the force be with you ;) Walter 2010/11/15 Randall Leeds : > Without testing this myself, I wonder if it's your choice of quotation > marks. Try using single quotes to delimit the strings and using double > quotes withing the actual JSON. Such as {startkey: '["foo", {}]'}. If memory > serves me correctly only double quoted strings are valid JSON. But I'm > tired, I could be inventing this :) > On Nov 15, 2010 12:14 AM, "Walter Werner" wrote: >> hi >> >> I am new to the mailinglist, hello to everyone. The web Interface of >> this mainling list seems not to have any search function, i hope this >> problem is new. >> >> When i am trying to make a GET request to one of my couchdb-search-view >> >> $.get('/mydb/_design/02/_view/search', {startkey:"['foo',0]", >> endkey: "['foo',{}]",reduce:true, group:true}, >> function(data) { >> alert(data); >> } >> ); >> >> I get the error: >> >> {"error":"bad_request","reason":"invalid UTF-8 JSON"} >> >> and my url looks like this: >> >> > http://localhost:5984/mydb/_design/02/_view/search?startkey=%5B%27foo%27%2C0%5D&endkey=%5B%27foo%27%2C%7B%7D%5D&reduce=true&group=true >> >> The quotation marks and the [ ] that are needed for the JSON format >> are url-encodet inside the $.get function. I do not know how to change >> this behaviour. I also tried it with $.post and $.ajax. The same >> result. Can anyone help? >> >> Thanks >> Walter >