Thank you, Andy. This is good to know. I can confirm that switching to
JSON-LD 1.1 no longer converts the language tags.
(Which is quite surprising, because only the 1.1 spec states that
language tags MAY get lower-cased, so this feels quite inverted).
Do you (or other JSON-LD experts) know why 1.0 is still the default, or
why anyone would prefer 1.0 over 1.1 these days? 1.0 seems to have been
superseded by 1.1, see https://github.com/w3c/json-ld-wg/issues/154
I guess for the time being we could add an option for our users to
switch between 1.0 and 1.1.
Holger
On 2022-03-04 8:10 pm, Andy Seaborne wrote:
Jena uses
jsonld-java for JSON-LD 1.0
titanium-json-ld for JSON-LD 1.1.
(The default is JSON-LD 1.0.)
jsonld-java lowercases
titanium-json-ld does not.
Is it an option for jsonld-java and jena just does not set it?
Please confirm: The graph are isomorphic. c.f. bnodes.
FWIW:
RDFParser has options for lowercase, canonical (such as "en-GB") or
"as is" for ingesting RDF.
Andy
On 04/03/2022 04:23, Holger Knublauch wrote:
The JSON-LD writer converts language tags to lower-case, e.g. "en-US"
becomes "en-us".
The code is in JsonLdApi:L664 and I guess it follows the recommendation
https://www.w3.org/TR/json-ld-api/#h-note-17
And the RDF 1.1 spec itself states that the value space of language
tags is lower case.
But syntactically that is a MAY and it means that RDF graphs cannot
be correctly round-tripped via JSON-LD.
>
Could there be a flag to switch this off? The other serializations
also do preserve the casing AFAIK, and when you add a triple to a
Jena Graph also no such transformations are taking place.
Thanks
Holger