W3C home > Mailing lists > Public > public-linked-json@w3.org > August 2018

Re: Why is the value of @version a number?

From: Asbjørn Ulsberg <asbjorn@ulsberg.no>
Date: Sat, 18 Aug 2018 13:59:59 +0200
To: Robert Sanderson <azaroth42@gmail.com>
Cc: Gregg Kellogg <gregg@greggkellogg.net>, Lutz Helm <helm@ub.uni-leipzig.de>, Linked JSON <public-linked-json@w3.org>
Message-Id: <81ba9d31-6b7d-46d7-98ca-b92998aa0e5a@ulsberg.no>
Do I understand the versioning correctly in that it is not a semantic version number?
https://semver.org/ [https://semver.org/]
If JSON-LD followed SemVer, 1.0 processors should be able to process all 1.x versions of JSON-LD, but not 2.x, since the major version indicates breaking changes.
If there’s breaking changes in 1.1, it can surprise implementors since according to SemVer that’s supposed to be backwards compatible with 1.0.

Asbjørn Ulsberg -=|=- asbjorn@ulsberg.no [asbjorn@ulsberg.no]
«He's a loathsome offensive brute, yet I can't look away»
On lør., aug. 18, 2018 at 0:18, Robert Sanderson <azaroth42@gmail.com> wrote:

I understand the concern, but at the speed of W3C standards, the likelihood of ever getting above 1.9 is extremely extremely low :D 1.0 started in 2012, 1.1 started 2018 ... extrapolating, it would be 2072 before we would need a 1.10

W3C does not have patch version, only external errata. I think a floating point number is fine here.
On Fri, Aug 17, 2018 at 3:01 PM, Gregg Kellogg < gregg@greggkellogg.net [gregg@greggkellogg.net] > wrote:
> On Aug 17, 2018, at 6:52 AM, Lutz Helm < helm@ub.uni-leipzig.de [helm@ub.uni-leipzig.de] > wrote:
> Hi,
> I just stumbled upon the fact that @version has to be a number in json-ld 1.1 contexts. Is there any reason why this is not a string?
> I guess it shouldn't ever happen that a spec is released as patch version, and there will probably not be more than eight more versions with nonbreaking changes to the spec, so a decimal number might suffice, but I'm still a little bit puzzled.

The reason @verion is a number, specifically 1.1, is so that a 1.0 processor not prepared for it will through an error, as every other value must either be a string, null, or an object. We want a 1.0 processor to stop processing so that it does not interpret the context and associated JSON-LD in a way which is different than a 1.1 processor would, so we make sure it will raise an exception.


> Best regards,
> Lutz
> --
> Lutz Helm
> Bereich Digitale Dienste
> AG Anwendungsentwicklung
> Universitätsbibliothek Leipzig
> Beethovenstraße 6, 04107 Leipzig
> T: +49 341 97 30566
> helm@ub.uni-leipzig.de [helm@ub.uni-leipzig.de]
> https://www.ub.uni-leipzig.de/ [https://www.ub.uni-leipzig.de/]

Rob Sanderson Semantic Architect The Getty Trust Los Angeles, CA 90049
Received on Saturday, 18 August 2018 12:00:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:52 UTC