On 15/12/2012, at 3:45 AM, David J. Biesack <[email protected]> wrote:

> 
> "4.1 add" bullet 3 reads (when completing the introductory sentence)
> 
> ... the target location MUST reference ...
> o An element to add to an existing array.
> 
> I think this is incorrect; the target location is the array and the "value" 
> is the "element to add to an existing array". I suggest:
> 
> ... the target location MUST reference ...
> o An existing array.


Given the JSON:

{
  "foo": [ "a", "b", "c" ]
}

then a reference to an existing array would be:

/foo

whereas a reference to an element of an existing array would be:

/foo/1

'add'ing to these would have VERY different effects; the former would replace 
the entire array; the latter would replace one member of it.

Both are legal, it's just that the former isn't getting captured in this 
definition; it's an object member, not an array member.

Cheers,

--
Mark Nottingham   http://www.mnot.net/



Reply via email to