Hello,
Actually, the link to the current specification is this one:
http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-01
It is _very_ different to the link above.
> 1. I wonder - what was the reason to choose this XPATH-like notation
> /object/property , instead of the closer-to-JavaScript dotted notation
> object.property ?
Exactly for avoiding to fall in the trap "JSON <=> JavaScript". JSON
may have JavaScript in its acronym, its format is designed to be
language-independent.
> 2. Am I missing the description of how to reference a numeric string?
> /array/0 = first item of the array
> /object/a = object.a
> ?? = object['0']
>
The same pointer will be used in either case. If you want to access
the first element of:
{
"x": [ "a", "b", "c" ]
}
or the property labeled "0" of:
{
"x": {
"k1": null,
"0": "a"
}
}
the JSON Pointer will be #/x/0. It is up to implementations to
correctly account for the fact that whatever is after #/x (if
anything) is an object or an array. And of course, it may very well
lead to a "dangling" pointer, which implementations must also account
for ;)
Hope this helps,
--
Francis Galiegue,
fgal...@gmail.com
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)