couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <>
Subject Re: partial/diff updates?
Date Fri, 28 Nov 2008 06:13:56 GMT

On 28/11/2008, at 4:08 PM, Paul Davis wrote:

> Any JSON diff format is going to require the JSON RFC's 'SHOULD' to
> either be changed to a 'MAY' or 'MUST'. The ambiguity in 'SHOULD' is
> going to cause problems.

That "SHOULD" is dominated by the preceding statement that "A JSON  
text is a serialized object or array", so it is effectively a "MUST"  
because the spec doesn't allow for any other possibility. IMO the JSON  
spec is not ambiguous in respect of this issue.

> Or we could use a array[-1] syntax like some languages.

For sure. My point is that a JSON-community driven diff might presume  
that Javascript expressions (as in JSONPath) are OK, and hence assume  
you would use "@.length - 1". The context of the JSON community is not  
necessarily Couch's context.

Antony Blakey
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

There is nothing more difficult to plan, more doubtful of success, nor  
more dangerous to manage than the creation of a new order of things...  
Whenever his enemies have the ability to attack the innovator, they do  
so with the passion of partisans, while the others defend him  
sluggishly, So that the innovator and his party alike are vulnerable.
   -- Niccolo Machiavelli, 1513, The Prince.

View raw message