Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 735D59516 for ; Fri, 24 Feb 2012 23:13:15 +0000 (UTC) Received: (qmail 44195 invoked by uid 500); 24 Feb 2012 23:13:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 44147 invoked by uid 500); 24 Feb 2012 23:13:13 -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 44138 invoked by uid 99); 24 Feb 2012 23:13:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 23:13:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dicky.dicky@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pw0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 23:13:09 +0000 Received: by pbcuo1 with SMTP id uo1so2610794pbc.11 for ; Fri, 24 Feb 2012 15:12:49 -0800 (PST) Received-SPF: pass (google.com: domain of dicky.dicky@gmail.com designates 10.68.72.70 as permitted sender) client-ip=10.68.72.70; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dicky.dicky@gmail.com designates 10.68.72.70 as permitted sender) smtp.mail=dicky.dicky@gmail.com; dkim=pass header.i=dicky.dicky@gmail.com Received: from mr.google.com ([10.68.72.70]) by 10.68.72.70 with SMTP id b6mr13410499pbv.58.1330125169055 (num_hops = 1); Fri, 24 Feb 2012 15:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=3otsiNQXhQsZu5DeNwOAlSZ00CLcHFygVXePcF+57uM=; b=vnsTPO/gwhBCpOM7K6SPVCAnguGrpOgWNYMH1AuL5AGh61nyjBV5zryhEppYcxq6sy WYQTBg3jtpKKnQlVS7NJ68B3UQ4xv0fnLIsXvD2i415Br1gLSko32piMJ4uY3whLUOot VI9JWw5nLg5g/Gye4F2RinUGCPRT3WRKLxbYs= MIME-Version: 1.0 Received: by 10.68.72.70 with SMTP id b6mr11055383pbv.58.1330125168889; Fri, 24 Feb 2012 15:12:48 -0800 (PST) Sender: dicky.dicky@gmail.com Received: by 10.142.165.18 with HTTP; Fri, 24 Feb 2012 15:12:48 -0800 (PST) In-Reply-To: References: Date: Sat, 25 Feb 2012 00:12:48 +0100 X-Google-Sender-Auth: It4901TAGanxsbCJhgvjH-AxIT8 Message-ID: Subject: Re: Comments in design doucment From: Dirk Heilig To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Ian, i don't get the point. i comment my map / reduce functions just like i comment all my other code in ohrer places, like this: //this is my map function to map all docs function(doc) { //i jost emit every doc emit(null, doc); } which results in a valid json like this: { "_id": "_design/delme", "_rev": "1-bed099dd4d01031ac4c177f5d7acf372", "language": "javascript", "views": { "delme": { "map": "//this is my map function to map all docs\nfunction(doc) {\n //i jost emit every doc\n emit(null, doc);\n}" } } } in my opinion thats the right way, because i'am commenting the code, not the data.. dirk 2012/2/24 Ian Mayo : > thanks for the advice chaps. > > I now realise this isn't something CouchDb specific, it's JSON > specific. =C2=A0The workaround is to add a comment as a field, as describ= ed > here: > http://stackoverflow.com/questions/244777/can-i-comment-a-json-file > > > On 23 February 2012 15:44, Ian Mayo wrote: >> Hi all, >> like a good software engineer I'm trying to document my code. >> >> But, each time I try to put a // or /* comment into my design document >> the transfer to couchdb fails. >> >> Is there a way of putting comments into a design document? >> >> cheers, >> Ian