[Fwd: Re: [apps-discuss] JSON Patch: jsondiff and syntax]

perhaps worth joining this discussion over on apps-discuss

-------- Original Message --------
Subject: Re: [apps-discuss] JSON Patch: jsondiff and syntax
Date: Sun, 11 Dec 2011 15:03:05 -0800
From: Roy T. Fielding <fielding@gbiv.com>
To: Martin Algesten <martin@algesten.se>
CC: apps-discuss@ietf.org
References: <0B1C718E-60C2-4F89-967B-7532C9AC96F7@algesten.se>

FWIW, discussion of which format is best for a diff should really be based
on what is being compared (a file or an abstract memory structure?) and what
is expected to process the diff.

For example, JSOP has a diff format


that should be evaluated based on comparing JCR repository trees and an
understanding that the main processor is going to be a server-side patch
implementation.  Given that context, our JSON represents a state of the
JCR repository: the actual diff format does not need to be JSON because
it won't be processed by a browser (only generated by XHR).

I happen to agree that choosing any verbose diff format is a non-starter,
even if we assume compression, though I have a hard time evaluating a
JSON diff proposal without a more concrete notion of what it is intended
to do and why anyone would want to use it.


On Dec 10, 2011, at 7:05 PM, Martin Algesten wrote:

> (Sorry Paul C. Bryan, I'm stalking you from list to list. ;)
> This is in reference to a discussion from a couple of days back 
> http://www.ietf.org/mail-archive/web/apps-discuss/current/msg03884.html
> Parallel to Paul's work I've dreamt up another JSON patch syntax and implemented a diff/patch tool here:
> https://github.com/algesten/jsondiff#readme
> I don't agree that the verbosity of the JSON Patch RFC (http://tools.ietf.org/html/draft-pbryan-json-patch-04) is okay.
> I believe one of the big reasons that JSON has gained such popularity over say XML, is the simplicity of it. The simplicity is gained by a loss of semantics or perhaps better call it "inferred" semantics. Such inference are even more obvious in other terse data exchange formats such as YAML.
> JSON Patch goes against this by having very explicit verbs "add", "replace", "move" etc. I don't buy the argument that using gzip transfer encoding solves this. XML compresses amazingly well, but I rather see that as an argument that something is wrong in the format to start off with.
> I also think about things like "diff -u" where the '+/-' becomes second nature and the patches are very readable. Currently a JSON Patch file is an instruction list of mutations - almost like a programming language, which for me is different to a diff. But then I'm clearly biased :)
> Cheers,
> Martin
> _______________________________________________
> apps-discuss mailing list
> apps-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/apps-discuss

apps-discuss mailing list

Received on Sunday, 11 December 2011 23:20:37 UTC