Re: [apps-discuss] JSON Patch not suitable for GeoJSON?

James M Snell <jasnell@gmail.com> Thu, 24 January 2013 16:08 UTC

Return-Path: <jasnell@gmail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 32B9921F8A51 for <apps-discuss@ietfa.amsl.com>; Thu, 24 Jan 2013 08:08:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.933
X-Spam-Level:
X-Spam-Status: No, score=-0.933 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, NO_RELAYS=-0.001, SARE_HTML_USL_OBFU=1.666]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IUeQnK1N8Jt2 for <apps-discuss@ietfa.amsl.com>; Thu, 24 Jan 2013 08:08:29 -0800 (PST)
Received: from mail-ia0-x231.google.com (mail-ia0-x231.google.com [IPv6:2607:f8b0:4001:c02::231]) by ietfa.amsl.com (Postfix) with ESMTP id 8ED9921F8573 for <apps-discuss@ietf.org>; Thu, 24 Jan 2013 08:08:25 -0800 (PST)
Received: by mail-ia0-f177.google.com with SMTP id h8so5063045iaa.36 for <apps-discuss@ietf.org>; Thu, 24 Jan 2013 08:08:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=qm3NlBUzraf97aXT3ZzBNH5z29jo88ruwuXH0LuRGaA=; b=xhekIAfVEMo0v7G5KxJSOY2hSdlUoUpob7lcOu/bbzgpKf75xwW+yx7ZcfpwG0/Lb+ VqnIzTyxzvw4bD6drHcI5G/Cm1pz3WZJR9PacA9gD5qvN0acOcACv4bLePSMKKC5aza4 f74aMKX25/B95nJCY7vB+hsOXuxdmaLKZHxywjHTcz1wlEfWRx3vOFM/nw105lW85q2t V97z1ktPF+tmFFcJVu71w7IEz1z0reEJ4zYw3dM8G7f41jCtghtbiHShTDEuipMMPM/Y z7vZK3UDmYB9fdI7yZAcBa1YLsGxAuNCveHPuHgQokylTj2fwRUQcl2r1BuRr/EpY/50 qnYQ==
MIME-Version: 1.0
X-Received: by 10.42.42.69 with SMTP id s5mr1522597ice.2.1359043701971; Thu, 24 Jan 2013 08:08:21 -0800 (PST)
Received: by 10.64.26.137 with HTTP; Thu, 24 Jan 2013 08:08:21 -0800 (PST)
Received: by 10.64.26.137 with HTTP; Thu, 24 Jan 2013 08:08:21 -0800 (PST)
In-Reply-To: <51014BDE.7080706@gmx.de>
References: <20130124130052.272540@gmx.net> <51014BDE.7080706@gmx.de>
Date: Thu, 24 Jan 2013 08:08:21 -0800
Message-ID: <CABP7RbfaTQpb1DKcxQZoJ=oBdUJ-0+=LRNz8DHywC2fh13_Yug@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: multipart/alternative; boundary="bcaec50fe5f5171aaf04d40b05ab"
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] JSON Patch not suitable for GeoJSON?
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
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: Thu, 24 Jan 2013 16:08:30 -0000

You may want to take a look at my json predicates draft. It provides an
extension for json-patch that addresses a broader range of cases.
 On 2013-01-24 14:00, Martin Kofahl wrote:

> Hello. I came across the draft-ietf-appsawg-json-patch-**10 proposal and
> hope that's the right here place to put a question.
>
> As far I can see any remove, replace, etc. operations can be applied on
> object members or numbered array elements, only. I don't think this is
> sufficient for some formats. Taking GeoJSON
>
> { "type": "FeatureCollection",
>    "features": [
>      { "type": "Feature",
>        "id": "2",
>        "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
>        "properties": {"prop0": "value0"}
>      },
>      ...
>    ]
> }
>
> as an example, operations may have to be applied on objects filtered by
> some key-value-conditions in its leafs.
>
> A JSON Patch document may have to look like this:
>
> [
>    { "op": "remove", "path": "/features/*/[\"id\"=\"2\"]::**parent" }
> ]
>
> Maybe you can exert this suggestion.
> ...
>

Essentially you're asking for XPath-like expression (which I sympathize
with :-).

However, the design goal was to keep things as simple as possible, and
furthermore the spec just has been approved.

So, too late as well :-)

Best regards, Julian
______________________________**_________________
apps-discuss mailing list
apps-discuss@ietf.org
https://www.ietf.org/mailman/**listinfo/apps-discuss<https://www.ietf.org/mailman/listinfo/apps-discuss>