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

"Martin Kofahl" <M.Kofahl@gmx.de> Thu, 24 January 2013 13:00 UTC

Return-Path: <m.kofahl@gmx.de>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 6C02021F8A27 for <apps-discuss@ietfa.amsl.com>; Thu, 24 Jan 2013 05:00:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.74
X-Spam-Status: No, score=-0.74 tagged_above=-999 required=5 tests=[BAYES_20=-0.74]
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id UdHRwX8a1kYg for <apps-discuss@ietfa.amsl.com>; Thu, 24 Jan 2013 05:00:56 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net []) by ietfa.amsl.com (Postfix) with ESMTP id 96A0621F8A43 for <apps-discuss@ietf.org>; Thu, 24 Jan 2013 05:00:55 -0800 (PST)
Received: from mailout-de.gmx.net ([]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MNwO5-1U5EJp38fb-007WkB for <apps-discuss@ietf.org>; Thu, 24 Jan 2013 14:00:54 +0100
Received: (qmail 1606 invoked by uid 0); 24 Jan 2013 13:00:54 -0000
Received: from by www021.gmx.net with HTTP; Thu, 24 Jan 2013 14:00:52 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Date: Thu, 24 Jan 2013 14:00:52 +0100
From: Martin Kofahl <M.Kofahl@gmx.de>
Message-ID: <20130124130052.272540@gmx.net>
MIME-Version: 1.0
To: apps-discuss@ietf.org
X-Authenticated: #403240
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
X-Priority: 3
X-Provags-ID: V01U2FsdGVkX1/wQCBGM2XwfFpDHUqPcItqzHl2zOhn7dlMw6mNsR A6VjUsCBJon9sqWgL9Qw+zsfiSML4+t4gqIg==
Content-Transfer-Encoding: 8bit
Subject: [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 14:42:56 -0000

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.

Kind regards,