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

Francis Galiegue <fgaliegue@gmail.com> Mon, 17 February 2014 05:54 UTC

Return-Path: <fgaliegue@gmail.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 E51F91A035C for <apps-discuss@ietfa.amsl.com>; Sun, 16 Feb 2014 21:54:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham
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 7BplEz_RmHqV for <apps-discuss@ietfa.amsl.com>; Sun, 16 Feb 2014 21:54:08 -0800 (PST)
Received: from mail-ee0-x22a.google.com (mail-ee0-x22a.google.com [IPv6:2a00:1450:4013:c00::22a]) by ietfa.amsl.com (Postfix) with ESMTP id C289F1A02DD for <apps-discuss@ietf.org>; Sun, 16 Feb 2014 21:54:07 -0800 (PST)
Received: by mail-ee0-f42.google.com with SMTP id b15so6864433eek.29 for <apps-discuss@ietf.org>; Sun, 16 Feb 2014 21:54:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=OvJzgaxe+q4vMzsWZFF/FOj9U0zF+W8uK0XAFi8f/uM=; b=sEc8NO4gM7Fbc6gr7zdwqrsUMheEx/m45UotzXZa+L2KO7ONiPCDRKy6S/p20Vl8Z7 /4xndez5k4Ip27a4Izr0JGQM/J/UXXTYlQwuntedhTafO/pugcg1x1VLVbfLqcNpEj++ i/JzIkZ7wGrBrakW3TYK3mtpsscbOhX7OObbOIKl9hYEjRHqDzSDGVFqcfiGR3FrsowN u8YfG1AASokI4HgODbLXFdINj/+BG5DUYXAYcU2kEP4rw9p4tEOyED0qrGQb0loMNSN9 aCOkXmAPTlEdP8sS/+86BVPdrG74hDr+iEWpBgJa3Z4XVW+nGiqCnrloUkXu0R+gv+rd 4dUw==
MIME-Version: 1.0
X-Received: by 10.15.56.130 with SMTP id y2mr25623432eew.17.1392616444944; Sun, 16 Feb 2014 21:54:04 -0800 (PST)
Received: by 10.14.223.132 with HTTP; Sun, 16 Feb 2014 21:54:04 -0800 (PST)
Date: Mon, 17 Feb 2014 06:54:04 +0100
Message-ID: <CALcybBAtKofVGcE0Kmq1zRc85VdS4ngPSoBxhxXb-6vEv4oOJQ@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: apps-discuss@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/apps-discuss/ZU_tS_DoE9rdGWfpQCP6zaw84-w
Subject: [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 05:54:10 -0000

Hello,

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 }?

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

Cheers,
-- 
Francis Galiegue, fgaliegue@gmail.com
JSON Schema in Java: http://json-schema-validator.herokuapp.com