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

Mitar <mmitar@gmail.com> Thu, 10 October 2019 21:43 UTC

Return-Path: <mmitar@gmail.com>
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 A9338120059 for <json@ietfa.amsl.com>; Thu, 10 Oct 2019 14:43:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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=gmail.com
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 pOnFJJ2DrA8i for <json@ietfa.amsl.com>; Thu, 10 Oct 2019 14:43:52 -0700 (PDT)
Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BC8DD12003E for <json@ietf.org>; Thu, 10 Oct 2019 14:43:51 -0700 (PDT)
Received: by mail-lf1-x132.google.com with SMTP id w67so5513588lff.4 for <json@ietf.org>; Thu, 10 Oct 2019 14:43:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jxL/mQd6wftr3FutHvqxfKhgmRFDv2i4Ap3UnQXZJDE=; b=hzmOurARqwkCH1ds0dELuN3NNXGHZSTLy+wRVO69Jy13nCE3Ihbym3ayXqhYkU9KS1 Hl1ha11g9iVeZ5vpWyNJHmcfiWXAol5tDyxm4e+D7IELYe+BQ60iAY5iEsTV6//pXa9L yi1qi7YB4TgmZHwCQ8I8YY/dWzILzypOgw1xDLmHxzfJmwkQ8w8B4lsJNG1v4Vnz50hr OzBh9jxNvWjAXTXL3gmmLx9xQP4DWXvR26H5dRaeP9vPUC6YGv4CeBI1Aq3g0EmxuEnc ZZied2fwlv5H7Qxv6LeZNE/cNG4tecV36yh0tcfwfQSSml6IygtLZ8razC0pHopwbrf/ 1gwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jxL/mQd6wftr3FutHvqxfKhgmRFDv2i4Ap3UnQXZJDE=; b=p8FHkbtujAssBmfeaHFT64n3A21xOEGUcEY5ow8fdtPgHeQHzre7w5lxV7W958F12n 0bm4lBuNUZJ/a3q3Unu2j1Hjs/SI5dXBXZr9Smz6oCe1d6Fsf/ibWte6LnY5BhsTO4a5 CrX8bZ3paSZ0osHbpMKJl3mMnI0CzBHbWtokvnB6gXi6HUJexl9xI2wGmbIZAt1dAhkb sdNiINy/1qDQhaX7z/MhYO66bx0uYg8I/rf7nswG3BK845k/6SaOa6RJp1bwxKoUcSGv 0lukLdqppd4Y+nQ1CsGOSow8+xWO+3jTrdECjgLP82PeqHfs8QipuTIUwjNE1kNJUIIV 34Yg==
X-Gm-Message-State: APjAAAUW0Izh0J++H+B0UJyf9a5aK/5SWTk9NgcfK8VCH9v+YZ9YmilD JAggy3wA15olIZSujRmsV6vR1SfNaJPkCyhMqZE=
X-Google-Smtp-Source: APXvYqzkdHu+1gZsv/PXbHQ3LHY03gUx8oydOeJqAYX5kGTYMOEKqyQASaumUdgSiG164J7OSGh3ze53WeEt2fXezvQ=
X-Received: by 2002:ac2:597b:: with SMTP id h27mr7134665lfp.100.1570743829938; Thu, 10 Oct 2019 14:43:49 -0700 (PDT)
MIME-Version: 1.0
References: <CAKLmikN0nNKL7Fyt4wn77_Nd1N9=UZE=jdcGKvb6v0z_LF0zUA@mail.gmail.com> <ME2PR01MB417749D967E132FEFCA84F43E59A0@ME2PR01MB4177.ausprd01.prod.outlook.com>
In-Reply-To: <ME2PR01MB417749D967E132FEFCA84F43E59A0@ME2PR01MB4177.ausprd01.prod.outlook.com>
From: Mitar <mmitar@gmail.com>
Date: Thu, 10 Oct 2019 23:43:37 +0200
Message-ID: <CAKLmikNx42c352A-tM9piVcH0=cgftNebc-wqpR8J7KcLfhocA@mail.gmail.com>
To: "Manger, James" <James.H.Manger@team.telstra.com>
Cc: "json@ietf.org" <json@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/DiSVuI6-7Xvqn7AphJ23cKNsCVk>
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: Thu, 10 Oct 2019 21:43:54 -0000

Hi!

Thank you for the reply.

On Tue, Oct 8, 2019 at 6:59 AM Manger, James
<James.H.Manger@team.telstra.com> wrote:
> 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-".

Sure, but that hold for regular "/0" as well, no? If there is an
object at / then it is a JSON Pointer for an object member named "0".
But if it is an array, it means accessing a particular element of the
array.

> A better approach would be a new "op" value and a new member to hold the range.

That is an interesting idea as well. I will think about it.


Mitar

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m