Re: [ietf-types] Request for review: application/json-patch

mike amundsen <mamund@yahoo.com> Mon, 24 October 2011 23:19 UTC

Return-Path: <mca@amundsen.com>
X-Original-To: ietf-types@ietfa.amsl.com
Delivered-To: ietf-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B1F7B11E8156 for <ietf-types@ietfa.amsl.com>; Mon, 24 Oct 2011 16:19:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.68
X-Spam-Level:
X-Spam-Status: No, score=-0.68 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, FORGED_YAHOO_RCVD=2.297, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S5eR8zLF50ov for <ietf-types@ietfa.amsl.com>; Mon, 24 Oct 2011 16:19:10 -0700 (PDT)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by ietfa.amsl.com (Postfix) with ESMTP id D9AC611E813E for <ietf-types@ietf.org>; Mon, 24 Oct 2011 16:19:09 -0700 (PDT)
Received: by iabn5 with SMTP id n5so9701812iab.31 for <ietf-types@ietf.org>; Mon, 24 Oct 2011 16:19:09 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.68.14.169 with SMTP id q9mr34491726pbc.107.1319498348775; Mon, 24 Oct 2011 16:19:08 -0700 (PDT)
Sender: mca@amundsen.com
Received: by 10.142.156.11 with HTTP; Mon, 24 Oct 2011 16:19:08 -0700 (PDT)
In-Reply-To: <1319490143.23040.8.camel@neutron>
References: <1319490143.23040.8.camel@neutron>
Date: Mon, 24 Oct 2011 19:19:08 -0400
X-Google-Sender-Auth: jtL0XmkhY6zWJCdF30lulFgu_oE
Message-ID: <CAPW_8m6XB0B68GnCNA-6D_5q5CFRj8jKpt1GftRYN640rjCCTg@mail.gmail.com>
From: mike amundsen <mamund@yahoo.com>
To: "Paul C. Bryan" <paul.bryan@forgerock.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: ietf-types@ietf.org
Subject: Re: [ietf-types] Request for review: application/json-patch
X-BeenThere: ietf-types@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Media \(MIME\) type review" <ietf-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-types>
List-Post: <mailto:ietf-types@ietf.org>
List-Help: <mailto:ietf-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Oct 2011 23:19:10 -0000

Paul:

checking the I-D document itself:

Sec #4 Operations:
"It is an error condition if an operation object contains more than
one operation member."

I am not clear on what this is telling me:
- the same JSON Pointer expression cannot appear more than once in a document
- something else?

possibly consider adding an example of a document that should be
rejected as it is malformed.

Sec #5 Error Handling
"In the event of an error condition, evaluation of the JSON Patch
document terminates and modification of the target document fails to
complete."

Does this mean the server should treat the document as an
"all-or-nothing" case? when an error occurs is the document left in a
"partial state" or left at the "initial state" before the request? is
this something you want to detail in the spec? if yes, you might want
to use RFC 2119 words here (MAY, SHOULD, MUST, etc.) .

It looks like your operations account for an error condition at the
individual "node" level:
"It is an error condition if the value to be replaced does not exist.", etc.

Are there error conditions that might occur at the "document" level
(or some other node above the target?

You do not indicate any use of 4xx codes here (i.e. mapping 4xx codes
to common error conditions in processing the patch); is this something
you want to include here or leave that up to the server to decide?

mca
http://amundsen.com/blog/
http://twitter.com@mamund
http://mamund.com/foaf.rdf#me





On Mon, Oct 24, 2011 at 17:02, Paul C. Bryan <paul.bryan@forgerock.com> wrote:
> I'm preparing for possibly taking an informational Internet-Draft [1]
> toward a proposed standard. I'm requesting review and feedback on the
> "application/json-patch" media type. To wit:
>
> -----
>
> The Internet media type for a JSON Patch document is application/
> json-patch.
>
> Type name:  application
>
> Subtype name:  json-patch
>
> Required parameters:  none
>
> Optional parameters:   none
>
> Encoding considerations:
>   Per JSON [RFC4627]: 8bit if UTF-8; binary if UTF-16 or UTF-32.
>
> Security considerations:
>   See Security Considerations in section 8.
>
> Interoperability considerations:  N/A
>
> Published specification:
>   draft-pbryan-json-patch-02
>
> Applications that use this media type:
>   HTTP clients and servers.
>
> Additional information:
>
>   Magic number(s):  N/A
>
>   File extension(s):  .json-patch
>
>   Macintosh file type code(s):  TEXT
>
> Person & email address to contact for further information:
>   Paul C. Bryan <paul.bryan@forgerock.com>
>
> Intended usage:  COMMON
>
> Restrictions on usage:  none
>
> Author:  Paul C. Bryan <paul.bryan@forgerock.com>
>
> Change controller:  Paul C. Bryan <paul.bryan@forgerock.com>
>
> -----
>
> Thank you for your consideration.
>
> Paul C. Bryan
> paul.bryan@forgerock.com
>
> [1] http://www.ietf.org/id/draft-pbryan-json-patch-02.txt
>
>
> _______________________________________________
> ietf-types mailing list
> ietf-types@ietf.org
> https://www.ietf.org/mailman/listinfo/ietf-types
>