Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 56535 invoked from network); 10 Nov 2010 20:44:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Nov 2010 20:44:58 -0000 Received: (qmail 83002 invoked by uid 500); 10 Nov 2010 20:45:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 82940 invoked by uid 500); 10 Nov 2010 20:45:28 -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 82932 invoked by uid 99); 10 Nov 2010 20:45:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Nov 2010 20:45:28 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.54] (HELO mail-ww0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Nov 2010 20:45:21 +0000 Received: by wwj40 with SMTP id 40so59126wwj.23 for ; Wed, 10 Nov 2010 12:45:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.136.194 with SMTP id s2mr8854930wbt.6.1289421893408; Wed, 10 Nov 2010 12:44:53 -0800 (PST) Received: by 10.227.136.14 with HTTP; Wed, 10 Nov 2010 12:44:53 -0800 (PST) X-Originating-IP: [156.33.195.149] In-Reply-To: References: Date: Wed, 10 Nov 2010 12:44:53 -0800 Message-ID: Subject: Re: Line Breaks in JSON Causing Issue With jQuery From: Matthew Woodward To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e657b29eec16400494b8ed47 X-Virus-Checked: Checked by ClamAV on apache.org --0016e657b29eec16400494b8ed47 Content-Type: text/plain; charset=ISO-8859-1 For anyone else coming across this thread, I enabled JSONP in my ini file and restarted CouchDB, did a bunch of experimentation, and finally hit on what works (for me anyway): var dbURL = " http://server:5984/database/_design/designname/_view/viewname?callback=?"; $.getJSON(dbURL, null, function(data) { alert(data.rows[0].value.whatever); }); If the alert looks right (and use Firebug to check your full response of course), then you should be in good shape. Firebug still complains in some cases (I tried a ton of iterations of things so I'd have to retrace my steps to see where exactly this occurs) because of the line breaks, but that seems to be a red herring. This is CouchDB 1.0.1 on Windows Server if that makes a difference to anyone. Thanks for the help! -- Matthew Woodward matt@mattwoodward.com http://blog.mattwoodward.com identi.ca / Twitter: @mpwoodward Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments. http://www.gnu.org/philosophy/no-word-attachments.html --0016e657b29eec16400494b8ed47--