Re: [apps-discuss] Question about draft-snell-merge-patch-08

"Manger, James" <James.H.Manger@team.telstra.com> Mon, 17 February 2014 06:16 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5CD4B1A0372 for <apps-discuss@ietfa.amsl.com>; Sun, 16 Feb 2014 22:16:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.198
X-Spam-Level: *
X-Spam-Status: No, score=1.198 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RCVD_IN_DNSWL_NONE=-0.0001, RELAY_IS_203=0.994] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZKDi3Cty_sml for <apps-discuss@ietfa.amsl.com>; Sun, 16 Feb 2014 22:16:53 -0800 (PST)
Received: from ipxavo.tcif.telstra.com.au (ipxavo.tcif.telstra.com.au [203.35.135.200]) by ietfa.amsl.com (Postfix) with ESMTP id 4FD1D1A0370 for <apps-discuss@ietf.org>; Sun, 16 Feb 2014 22:16:53 -0800 (PST)
X-IronPort-AV: E=Sophos;i="4.95,859,1384261200"; d="scan'208";a="183801090"
Received: from unknown (HELO ipccvi.tcif.telstra.com.au) ([10.97.217.208]) by ipoavi.tcif.telstra.com.au with ESMTP; 17 Feb 2014 17:16:49 +1100
X-IronPort-AV: E=McAfee;i="5400,1158,7351"; a="193997286"
Received: from wsmsg3754.srv.dir.telstra.com ([172.49.40.198]) by ipccvi.tcif.telstra.com.au with ESMTP; 17 Feb 2014 17:16:50 +1100
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3754.srv.dir.telstra.com ([172.49.40.198]) with mapi; Mon, 17 Feb 2014 17:16:31 +1100
From: "Manger, James" <James.H.Manger@team.telstra.com>
To: Francis Galiegue <fgaliegue@gmail.com>, "apps-discuss@ietf.org" <apps-discuss@ietf.org>
Date: Mon, 17 Feb 2014 17:16:30 +1100
Thread-Topic: [apps-discuss] Question about draft-snell-merge-patch-08
Thread-Index: Ac8rpLH/iVd1h2hyTd6bl/Efb3w2SwAAMfGQ
Message-ID: <255B9BB34FB7D647A506DC292726F6E1153B519138@WSMSG3153V.srv.dir.telstra.com>
References: <CALcybBAtKofVGcE0Kmq1zRc85VdS4ngPSoBxhxXb-6vEv4oOJQ@mail.gmail.com>
In-Reply-To: <CALcybBAtKofVGcE0Kmq1zRc85VdS4ngPSoBxhxXb-6vEv4oOJQ@mail.gmail.com>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/apps-discuss/L_oysTh6OnK3TY_G2GgRMLuDiGg
Subject: Re: [apps-discuss] Question about draft-snell-merge-patch-08
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Feb 2014 06:16:55 -0000

> I have an implementation of said draft which basically works, but some
> questions remain unclear with regards to applying patches to JSON
> values which are not objects and null values in the patch.
> 
> Say we have JSON value:
> 
> true
> 
> and the patch reads:
> 
> {
>     "foo": null
> }
> 
> The draft says both that member "foo" should be considered undefined
> and that the whole JSON value should be replaced by the patch. So,
> what is the result of the above? Is it {} or { "foo": null }?

{} is the only result that makes sense to me.


> Similarly, if the patch were { "foo": { "bar": null } }, would the
> result be { "foo": {} } or { "foo": { "bar": null } }?

{ "foo": {} } is the sensible answer.


--
James Manger