Re: [Json] RFC 4627bis vs RFC 6902 (JSON Patch)

Francis Galiegue <fgaliegue@gmail.com> Thu, 20 February 2014 17:36 UTC

Return-Path: <fgaliegue@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1ABD81A0047 for <json@ietfa.amsl.com>; Thu, 20 Feb 2014 09:36:04 -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 fU75w_vzRzf0 for <json@ietfa.amsl.com>; Thu, 20 Feb 2014 09:36:01 -0800 (PST)
Received: from mail-ea0-x229.google.com (mail-ea0-x229.google.com [IPv6:2a00:1450:4013:c01::229]) by ietfa.amsl.com (Postfix) with ESMTP id 9913A1A0074 for <json@ietf.org>; Thu, 20 Feb 2014 09:36:01 -0800 (PST)
Received: by mail-ea0-f169.google.com with SMTP id h10so1064024eak.0 for <json@ietf.org>; Thu, 20 Feb 2014 09:35:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3mwsAsZU3bnNHUSmNsl2hDxLCccplScJHiw1/IPzg08=; b=nf6z0V/MXDfv3DmqioP6CUq8O9G8cXOG0NshgjfAMhnXve5n/dgcfWkcw0dAqL+kri Sr00tHoT2X1MPSJwIDzqjpJTPYvnvJphnk9zLk+gndk5+o2rBIHNFd3olS/WMO37alDb 63gMtYgh3clxTzC5xDDc8xviqO9deaEraUOpfftATI8cYNxpjqDlzrYlz7smnQGwYLYC gv0IPv4NOWH9e0dh6NEGO+S+I0FpKPiy6EwX95oYQ1mrSc4WRBOPPJMUo8C7Bw9VMUsz xMLxwQtO5ESLNQdKAHVDdJbRpnGsJluBllmKXBOh0nCHI9mfwIz/Pd1VVhy/EQxvbYQm +Jyg==
MIME-Version: 1.0
X-Received: by 10.15.93.203 with SMTP id w51mr3180104eez.33.1392917757529; Thu, 20 Feb 2014 09:35:57 -0800 (PST)
Received: by 10.14.223.132 with HTTP; Thu, 20 Feb 2014 09:35:57 -0800 (PST)
In-Reply-To: <CAC4RtVD5J2oeTQGDNW5=M1oO4MuY_7i7z9G1Q=+icLr9su8aUQ@mail.gmail.com>
References: <CALcybBCTih9A6RL=r4WYrqf05rHsjgF4tEJP3cTY2FAmONRQaw@mail.gmail.com> <CAC4RtVD5J2oeTQGDNW5=M1oO4MuY_7i7z9G1Q=+icLr9su8aUQ@mail.gmail.com>
Date: Thu, 20 Feb 2014 18:35:57 +0100
Message-ID: <CALcybBBmkhwFWiqB+3Fz8vpLm1WZwmoXTkDi9FUhZY8Ftnj0dw@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: Barry Leiba <barryleiba@computer.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/xevKGVJGpXiVlPpgoY3Bt-DDlHk
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] RFC 4627bis vs RFC 6902 (JSON Patch)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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, 20 Feb 2014 17:36:04 -0000

On Thu, Feb 20, 2014 at 6:31 PM, Barry Leiba <barryleiba@computer.org> wrote:
>> The latter makes sense on the _producer_ of a patch operation;
>> however, on the parser side, should a parser receive a "malformed"
>> (f.e duplicated "op") operation, it seems to me that RFC 6902 expects
>> the parser to raise an error -- which RFC 4627bis does not mandate.
>
> What do you see as a conflict?
>
> The JSON spec gives general parameters for JSON, and allows duplicates.
>
> The JSON Patch spec gives specific parameters for a specific use of
> JSON.  For that use, duplicates are not allowed.
>
> That all looks just fine to me, and absolutely consistent.
>

Not to me. As I see it, 75+% of JSON parsers on the "market" just
cannot parse JSON Patch correctly because of the restrictions imposed
by RFC 6902. Note: parse, not emit (or "consume, not produce" -- or
whatever metaphor suits you).

IOW: I don't see "MUST have a unique member named 'foo'" and
"behaviour is unpredictable" as being consistent with one another.

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