Subject: Re: [apps-discuss] draft-pbryan-json-patch-04 - comments

From: Ray Polk <[email-masked]>
Date: Wed, 21 Mar 2012 14:30:21 -0700 (PDT)

----- [email-masked] wrote:

| > 1. I am not sure if 'test' operation should be part of it. The purpose
| > of the patch is to modify the document. 'test' operation either
| > succeeds of fails, but it is unclear how this information will be
| > communicated or used. It almost looks like a API operation rather than
| > patch format instruction. I would argue that in current state it should
| > not be included in the format.
| 
| Maybe I'm too firmly rooted in UNIX patch/diff land, but I don't think
| I agree.  "test" is useful up-front to ensure you're about to modify
| what you intend to modify, and give you a chance to abort otherwise. 
| In this case, "test" would be used to confirm you're in a context you
| want to modify, much like the lines of context around a traditional
| UNIX patch.
| 
| I would say that "test" is not useful except before any
| add/modify/remove instructions.  If it fails to establish context, the
| whole patch aborts.

Much like If-Match?  Would a strong tag or hash be better than a content comparison?

---

From: "Paul C. Bryan" <[email-masked]>
Date: Wed, 21 Mar 2012 14:48:27 -0700

Hashing would be a good idea (because currently test requires the entire
value to be expressed) but seemed like it could also add significant
complexity, in large part due to the need to perform some level of
transformation/normalization to establish a stable value to hash.

Paul

On Wed, 2012-03-21 at 14:30 -0700, Ray Polk wrote:

> _______________________________________________
> apps-discuss mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/apps-discuss