Hmm.. I think that’s quite problematic. Especially considering how JSON Pointer is used in JSON Patch. -- Markus Lanthaler @markuslanthaler From: James M Snell [mailto:jasnell@xxxxxxxxx] Sent: Friday, December 14, 2012 5:41 PM To: Markus Lanthaler Cc: IETF Discussion; IETF Apps Discuss Subject: Re: [apps-discuss] Last Call: <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to Proposed Standard JSON Pointer does not distinguish between objects and arrays. That is not determined until the pointer is applied to an actual object instance... the pointer "/1" is valid against {"1":"a"} or ["a","b"] On Fri, Dec 14, 2012 at 2:51 AM, Markus Lanthaler <markus.lanthaler@xxxxxxx> wrote: I've asked that before but didn't get an answer. So let me ask again (even though I'm quite sure it has already been asked by somebody else).
How does JSON Pointer distinguish between objects and arrays? E.g. consider the following JSON document:
{ "foo": "bar", "1": "baz" }
As I read the draft, the JSON Pointer "/1" would evaluate to "baz" even though that's probably not what the author intended. Is there a way to avoid that?
Thanks, Markus
-- Markus Lanthaler @markuslanthaler |