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 722CE4942 for ; Fri, 10 Jun 2011 17:21:17 +0000 (UTC) Received: (qmail 32399 invoked by uid 500); 10 Jun 2011 17:21:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 32369 invoked by uid 500); 10 Jun 2011 17:21:15 -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 32361 invoked by uid 99); 10 Jun 2011 17:21:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 17:21:15 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [207.126.144.119] (HELO eu1sys200aog105.obsmtp.com) (207.126.144.119) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 10 Jun 2011 17:21:07 +0000 Received: from mail-pz0-f48.google.com ([209.85.210.48]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKTfJSbF17KNbNIQCr7mZPLx0u5t8+sOUq@postini.com; Fri, 10 Jun 2011 17:20:46 UTC Received: by pzk10 with SMTP id 10so1840148pzk.35 for ; Fri, 10 Jun 2011 10:20:42 -0700 (PDT) Received: by 10.68.6.65 with SMTP id y1mr1128361pby.163.1307726442098; Fri, 10 Jun 2011 10:20:42 -0700 (PDT) Received: from [192.168.1.177] (S0106001346fbe4af.vf.shawcable.net [174.1.44.35]) by mx.google.com with ESMTPS id 10sm2295013pbk.13.2011.06.10.10.20.41 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2011 10:20:41 -0700 (PDT) Subject: Re: JSON Patch Internet Draft 01 From: "Paul C. Bryan" To: user@couchdb.apache.org Cc: json-patch@googlegroups.com In-Reply-To: References: <1307642964.1706.84.camel@dynamo> Content-Type: multipart/alternative; boundary="=-FgZSkyWOkSgN+/TGUznv" Date: Fri, 10 Jun 2011 10:20:55 -0700 Message-ID: <1307726455.1706.111.camel@dynamo> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 --=-FgZSkyWOkSgN+/TGUznv Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Thu, 2011-06-09 at 16:39 -0700, Eli Stevens (Gmail) wrote: [snip] > I think that it should be possible to specify what value should be > present when removing something. Text-based patches don't just say > "remove line 42" they also spell out what content is expected to be > there before removal. Similarly, I think that supporting context > verification is important. Something like the following being applied > to the resulting doc above: I am inclined to leverage HTTP conditions (e.g. If-Match) to ensure resource state rather than try to build additional tests and concurrency mechanisms into the patch format. [snip] > For what it's worth, I don't think that using a list of strings for > the pointer is bad at all. Why invent a new string sub-syntax when > you can use an existing JSON structure? Having wasted more hours of > my professional life lamenting trying to cram arbitrary user data into > the path portion of a URL than I care to admit, I can't recommend the > approach. Spelling the separator as "," instead of / isn't that big > of a deal, esp. when for simple cases with a full JS interpreter > handy, one could use "/a/b/c".split("/"). There is a clear need for a scheme to identify a JSON node within a URI fragment—this is what JSON Schema uses; I would rather leverage that scheme than deviate from it and invent yet another for JSON Patch. Paul --=-FgZSkyWOkSgN+/TGUznv--