Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 50225 invoked from network); 18 Jun 2009 12:07:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jun 2009 12:07:16 -0000 Received: (qmail 18655 invoked by uid 500); 18 Jun 2009 12:07:27 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 18591 invoked by uid 500); 18 Jun 2009 12:07:27 -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 18581 invoked by uid 99); 18 Jun 2009 12:07:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2009 12:07:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of francisco.treacy@gmail.com designates 209.85.218.218 as permitted sender) Received: from [209.85.218.218] (HELO mail-bw0-f218.google.com) (209.85.218.218) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2009 12:07:15 +0000 Received: by bwz18 with SMTP id 18so1273178bwz.11 for ; Thu, 18 Jun 2009 05:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=QnlHcGCbtjRJZYFYIN0aTR7GV6ODlkxkz79WCRkgavE=; b=N0o3BNUW/OgJRnZsrZwwdG35xRrfZYsqH2juiX9BmNp26+t/LbOJ7f8NsAKNQJ2FCz 8CIWmNTvUK24gznP0v3DLpf+DrE6cmNLCTzrx/DUxlLSW9iMdqY6HgA+N/whS/NGJYWr 6RnWduPBDYzh2Oq8zWBzgmLLVX8ZxOVhaBGTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=Wy1c3I7CVQjWZVKko93Yds1Ftd8Wpg5leIOzSgAL+4G57zZkC+YR9qV2nRjZ2TBb9y agTLNTJYmbbxzIVioq6VhRr0Vb+bRKG1Ld8YQy6/WS6oo8+1KO9iPSyFsLDyr0mmAzXN Ycyo/ICmPD/zLlyjJQ2o1ylFGas16xaPijFPw= MIME-Version: 1.0 Received: by 10.223.113.9 with SMTP id y9mr1125470fap.61.1245326814600; Thu, 18 Jun 2009 05:06:54 -0700 (PDT) Date: Thu, 18 Jun 2009 14:06:54 +0200 Message-ID: <41c8480f0906180506u3796d492h89549c4e376f0467@mail.gmail.com> Subject: jquery and trailing \n From: francisco treacy To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I'm trying to get something super simple running in Firefox, not without problems. >From a local html file I am using jQuery to make an ajax call to CouchDB like so: $.getJSON('http://localhost:5984/test/test?jsoncallback=?', function(data) { alert(data._id); }) but Firebug always shows an "invalid label" error, with the following response: {"_id":"test","_rev":"1-1480939370"}\n For instance, this works ok: $.getJSON('http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?', function(data) { alert(data.title); }) Also when I try with a local json file (just {title: "test"}) it works fine, when i put {title: "test"}\n , it doesn't. Could the trailing \n be the problem here? Any other pointers from people who have tried parsing CouchDB's json with jQuery? Thanks in advance, Francisco