Subject: [Jsonpath] References to XPath

From: Michael Kay <[email-masked]>
Date: Fri, 6 Nov 2020 00:01:43 +0000

Could the document title 

JSONPath -- XPath for JSON

be changed please? This language is vaguely XPath-like but it is not XPath; and XPath 3.1 provides a quite different syntax for access to JSON documents.

Someone on StackOverflow today asked a question about JSONPath; they called it (and tagged it) XPath, we really don't want that kind of confusion.

In addition, the reference to the XPath specification in 6.2 is out of date, and the comparison with XPath in Table 2 is very approximate and the terminology inaccurate: for example there is a mention of "node sets", which exist in XPath 1.0 but not in XPath 2.0, yet the citation is to XPath 2.0. For someone who knows the semantics of XPath the comparison raises all sorts of questions about sorting of results into document order, elimination of duplicates etc, which are complications this spec can well do without. (Though some answers are needed, for example if ..store..price matches the same price in more than one way, do you get more than one result? And if not, what does "the same price" actually mean?)

I think this "explanation by analogy" might have some value in a brief tutorial, but in a normative specification it can only create confusion.

Michael Kay
Saxonica

---

From: Tim Bray <[email-masked]>
Date: Thu, 5 Nov 2020 16:19:01 -0800

+1

On Thu, Nov 5, 2020 at 4:01 PM Michael Kay <[email-masked]> wrote:

> be changed please? This language is vaguely XPath-like but it is not
> XPath; and XPath 3.1 provides a quite different syntax for access to JSON
> documents.
>
> Someone on StackOverflow today asked a question about JSONPath; they
> called it (and tagged it) XPath, we really don't want that kind of
> confusion.
>
> In addition, the reference to the XPath specification in 6.2 is out of
> date, and the comparison with XPath in Table 2 is very approximate and the
> terminology inaccurate: for example there is a mention of "node sets",
> which exist in XPath 1.0 but not in XPath 2.0, yet the citation is to XPath
> 2.0. For someone who knows the semantics of XPath the comparison raises all
> sorts of questions about sorting of results into document order,
> elimination of duplicates etc, which are complications this spec can well
> do without. (Though some answers are needed, for example if ..store..price
> matches the same price in more than one way, do you get more than one
> result? And if not, what does "the same price" actually mean?)
>
> I think this "explanation by analogy" might have some value in a brief
> tutorial, but in a normative specification it can only create confusion.
>
> Michael Kay
> Saxonica
> --
> Jsonpath mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/jsonpath
>

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 6 Nov 2020 09:15:36 +0100

Now

https://github.com/jsonpath-wg/draft-goessner-jsonpath/issues/1

Grüße, Carsten

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 6 Nov 2020 09:46:15 +0100

Hi Michael,

indeed, the title clearly needs to be updated to what we are actually doing here.

Mentioning that XPath was an inspiration for the original development of JSONpath was helpful in 2007 and is still helpful.  The text should certainly not give the impression that XPath is a normative reference (which it isn’t) — that’s why the title for 1.2 is “Inspired by XPath”.

We haven’t discussed yet how we will be constructing the WG draft; I would expect that draft-goessner is a quarry that contributes introductory material for that.
I would expect that we’ll retain some historical background information in the final spec and that includes pointing to XPath - probably not the current version, but the version that actually was the inspiration.

Grüße, Carsten

---

From: Glyn Normington <[email-masked]>
Date: Fri, 6 Nov 2020 16:32:36 +0000

Perhaps we could avoid mentioning XPath in the title and leave that for the
introduction? The other draft has the title "JavaScript Object Notation
(JSON) Path", for example.

On Fri, 6 Nov 2020, 08:46 Carsten Bormann, <[email-masked]> wrote:

> Mentioning that XPath was an inspiration for the original development of
> JSONpath was helpful in 2007 and is still helpful.  The text should
> certainly not give the impression that XPath is a normative reference
> (which it isn’t) — that’s why the title for 1.2 is “Inspired by XPath”.
>
> We haven’t discussed yet how we will be constructing the WG draft; I would
> expect that draft-goessner is a quarry that contributes introductory
> material for that.
> I would expect that we’ll retain some historical background information in
> the final spec and that includes pointing to XPath - probably not the
> current version, but the version that actually was the inspiration.
>
> Grüße, Carsten
>
> --
> Jsonpath mailing list
> [email-masked]