Re: [Json] Extending JSON Patch (or JSON Pointer) to include indexing into a string

Mark Nottingham <mnot@mnot.net> Tue, 08 October 2019 05:07 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AF6A112006B for <json@ietfa.amsl.com>; Mon, 7 Oct 2019 22:07:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=BG/0Booe; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=s9C+T19x
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 n3418TP4Q7gq for <json@ietfa.amsl.com>; Mon, 7 Oct 2019 22:07:41 -0700 (PDT)
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D6A7A12000F for <json@ietf.org>; Mon, 7 Oct 2019 22:07:41 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id EAB10583; Tue, 8 Oct 2019 01:07:40 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 08 Oct 2019 01:07:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm3; bh=2 oxHy/Lw78D8uhQoZxI0iu/WOEinCTCiNgKzG/IaeFg=; b=BG/0BooesGTMwIIAF tz/ULVlZXgUjSP+IZDfPOxd5VvBmK3G5xYegDxPIgLC0G9F8jBS39vc4Zo4zG77W keJduEOpWI+VFrFwEPuJ1bruBmVj75gQAj32mxLevsMFoKQbFoKQXslBDZCq6SBw MClP7wCTAAv4UtFrrRjWoHItxFep/OQ5xHCn81Q+TmbcANvfrtYXBObamcd4dbVD 9cZ6IOMFrm53Uh4ylJwSTwnTCfVCWlkYj1AMS2UjqOMtqaVA9QQsmlToA1v/hvLj esn4defX+QbH3w5SF7qWqS/iPSexjr9qTYSpcIHVRILUf2xRGYtLK+DvwBOnnL2B imz+A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=2oxHy/Lw78D8uhQoZxI0iu/WOEinCTCiNgKzG/Iae Fg=; b=s9C+T19xAO0ejYD9UEY88+8P2c7K3YmEaQEAblEpJ4UAJG6ETI2clu7td zedxz/IcaBB+VR6U5ze34vdFsiXVdAN1FeTWMc+E/IWcNF2qgtybym0xXE0ZrOTc cOW8GVTI/B9avPedpPl6dqw9+C1Lj1N+dlZA/RV6gL3xojpzhXcz3da6vznaRDWy /jgRrdSQWRAicYexr+k2OYJistkQhF0l1XyUaCKbLfNxxxu2LnUdcDtd1jDMxu0s IRjDCotLmIOO9gPy+U5l0wk9dNO332R8ZxFPf24TwzbxpnDTZolTC/lum6j/uDTX cq5C7qB9gl7CarfiXWVolZsG/RkIQ==
X-ME-Sender: <xms:mhmcXenMGiARuvZQQJtyXGRSWQi9btAo8oG1D34aIlbC-32Gspq8-Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrheekgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpeforghrkhcu pfhothhtihhnghhhrghmuceomhhnohhtsehmnhhothdrnhgvtheqnecuffhomhgrihhnpe hrfhgtqdgvughithhorhdrohhrghdpghhithhhuhgsrdgtohhmpdhivghtfhdrohhrghdp mhhnohhtrdhnvghtnecukfhppeduvddurddvtddtrdegrddukeehnecurfgrrhgrmhepmh grihhlfhhrohhmpehmnhhothesmhhnohhtrdhnvghtnecuvehluhhsthgvrhfuihiivgep td
X-ME-Proxy: <xmx:mhmcXZzceIKVKlRWeGgI6uU2KrfoPhRnCY-AHEPIwS3mrSFPmDpMrQ> <xmx:mhmcXVJWNxRwbbZZdPLbFjWPHZ11w7ZWteZZ_U4vbtg2ElRnVvqgNA> <xmx:mhmcXcJ9kXSL0MXSy9L1ew2cZQuxcA2FRQdZyB6cMsLNEqtINSbyFg> <xmx:nBmcXfkCbKY8FBhSWFP0dc85brTgsAl8OAvg8vMsgrGU6Sfj0YggrA>
Received: from macbook-pro.mnot.net (121-200-4-185.79c804.syd.nbn.aussiebb.net [121.200.4.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 7CFA380059; Tue, 8 Oct 2019 01:07:37 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <ME2PR01MB417749D967E132FEFCA84F43E59A0@ME2PR01MB4177.ausprd01.prod.outlook.com>
Date: Tue, 08 Oct 2019 16:07:33 +1100
Cc: Mitar <mmitar@gmail.com>, "json@ietf.org" <json@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <EF8CC940-2874-46DB-9439-1CBFEDF97846@mnot.net>
References: <CAKLmikN0nNKL7Fyt4wn77_Nd1N9=UZE=jdcGKvb6v0z_LF0zUA@mail.gmail.com> <ME2PR01MB417749D967E132FEFCA84F43E59A0@ME2PR01MB4177.ausprd01.prod.outlook.com>
To: "Manger, James" <James.H.Manger@team.telstra.com>
X-Mailer: Apple Mail (2.3594.4.19)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/Xnr10NsopS60YQGwW6fq_l4w-eA>
Subject: Re: [Json] Extending JSON Patch (or JSON Pointer) to include indexing into a string
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Oct 2019 05:07:45 -0000

Also, we're collecting input for possible future revisions / extensions here:
  https://github.com/json-patch/json-patch2/issues

Please feel free to add an issue there.

Cheers,


> On 8 Oct 2019, at 3:35 pm, Manger, James <James.H.Manger@team.telstra.com> wrote:
> 
>> So what do people think about supporting a patch (probably by simply extending JSON Pointer)
> 
> Tacking "/0-3" or "/2-" on the end of a JSON Pointer is a bad idea as it looks like a legitimate JSON Pointer for an object member named "0-3" or "2-". A better approach would be a new "op" value and a new member to hold the range. For example:
> 
>  { "op":"string_replace", "path":"/value", "range":"0-3", "value":"no"}
> 
> Whether its best to provide a range & value, or old & new substrings, or a regex & replacement, or a line-oriented diff format, ... I'm not sure.
> 
>> Also, I have no experience with the IETF process on how would one go about introducing such a change to existing standards.
> 
> Perhaps write some code to convince yourself it works well; document it in an independent submission (https://www.rfc-editor.org/about/independent/) called, say, draft-mitar-json-string-patch; and see if any IETF group is interested.
> 
> --
> James Manger
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json

--
Mark Nottingham   https://www.mnot.net/