Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 53428 invoked from network); 26 Aug 2009 22:31:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 22:31:26 -0000 Received: (qmail 96421 invoked by uid 500); 26 Aug 2009 22:31:25 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 96339 invoked by uid 500); 26 Aug 2009 22:31:24 -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 96329 invoked by uid 99); 26 Aug 2009 22:31:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 22:31:24 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of francisco.treacy@gmail.com designates 209.85.220.227 as permitted sender) Received: from [209.85.220.227] (HELO mail-fx0-f227.google.com) (209.85.220.227) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 22:31:15 +0000 Received: by fxm27 with SMTP id 27so581137fxm.11 for ; Wed, 26 Aug 2009 15:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=U4gcuwaSZGF7zuUoWRJXHF+j4VlEc271ql+2uWxvy24=; b=Rk6fDJyLdx50C7+kAieNHICvyK9zKo9j2SvtusLPB08Jz7lXd+NaOM/3HqWmi+Jmiw dz0aYbEliQo9O2w5KyHtjEJnknqgcfnwd1rl1EMWlJehAhroYBK8URuumK1xKZZ028eJ 3m0LVn1FRRm7Ysv3sbQIzCDx1b/M0xmnKbCbw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=amFs12llo/gZhJ9bfRj7clz0qPZ7omAmnL+kWAVKbo4vLwCBGt4cMs1y4nYXCAVnM4 g5h727slwmcXEBj5G5NBkR/tgK0ULBQRSFbaYFjx3yxkATP5VyeHhp3G6ZCIZOKhtLZL OAk0cdK8x9y8qBe0saxoUvuBYZNV4Ock+puDc= MIME-Version: 1.0 Received: by 10.204.11.23 with SMTP id r23mr4094707bkr.158.1251325854941; Wed, 26 Aug 2009 15:30:54 -0700 (PDT) In-Reply-To: References: <41c8480f0908260733o14970a39nbf1e2f8f4742fd7b@mail.gmail.com> <41c8480f0908261503i7f4206dbl64597d88c5574834@mail.gmail.com> Date: Thu, 27 Aug 2009 00:30:54 +0200 Message-ID: <41c8480f0908261530v1f7f1cb0oe3810e73e7bdead3@mail.gmail.com> Subject: Re: underscores in json keys 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 Makes sense. Thanks, Paul. Francisco 2009/8/27 Paul Davis : > On Wed, Aug 26, 2009 at 6:03 PM, francisco > treacy wrote: >> Oh, ok. >> >> This means the cornerstone of my library is built upon a bug :) > > I wouldn't say that. There's nothing that keeps your library from > reserving a prefix for its internal use. You're free to use anything > like $ or # or even use a _ suffix. > >> Is there any way I can define such a key, in order to interfere as >> less as possible with library user's data? (i was thinking perhaps >> externals some way to define some "reserved" keys?) > > The only two approaches would be convention and nesting. If you want > to make sure you can store anything at all with the library, the only > real answer is to create an object like {"_id": "foo", "user_data": > ...} but just using another non-underscore prefix wouldn't be too far > out of the question. Granted you might want to see if anyone else has > nominated one for consistency across libraries. > > HTH, > Paul Davis >