What should the default settings be JSON-LD 1.0 or 1.1?

It is not a simple choice.

There is slightly pretty writing of JSON-LD 1.1 now - prefixes and native types.

A new issue is
e.g. https://github.com/apache/jena/issues/1254

JSON-LD 1.1 is not completely backwards compatible with JSON-LD 1.0.

Current status:

There are two JSON-LD subsystems with their own language and format constants as well as terms for the system "JSON-LD" settings. API code can choose which it wishes to use. All the previous features of JSON-LD 1.0 writing are available this way.

The decision is what are the defaults for application/ld+json.

This affects Fuseki users where where isn't scope to have a switch between 1.0 and 1.1.

In issues/1254, the reading client software isn't Jena so the conservative choice of writing 1.0 while reading 1.1 does not really work out.

The decision for Jena is when to switch.

JSON-LD 1.1 is becoming the norm.

It isn't practical to remain at JSON-LD 1.0 indefinitely.

I think we're at the point where we ought to switch reading and writing to JSON-LD 1.1 unless we have examples/evidence where this is a problem.

    Andy


On Fri, Mar 11, 2022 at 11:39 AM Andy Seaborne <[email protected]> wrote:

Jena has both JSON 1.0, provided by jsonld-java, and JSON-LD 1.1,
provided by Titanium.

What should the default settings be?

For parsing that means what is bound to "application/ld+json" and file
extension .jsonld.

For writing, it means what is setup for Lang.JSONLD.

This is two decisions - parsing and writing can be different.


But.

It is not so simple:

1/ For Java11, the default settings for java.net.http can't contact
schema.org.

This seems to only affect on a few (maybe one) Java 11 build version. The latest Java11 available on Ubuntu works.

2/ Jena is writing JSON-LD 1.1 without much in the way of transformation
nor creating a @context from the RDF data. It prints full URIs; numbers
aren't abbreviated etc etc. so it not very pretty.

There is slightly pretty writing of JSON-LD 1.1 now - prefixes and native types.

So there is "plain", no prefixes, no native types (and hence completely faithly RDF), and "pretty" (JSON numbers).


Add issue 3:

JSON-LD 1.1 is not completely backwards compatible with JSON-LD 1.0.

e.g. https://github.com/apache/jena/issues/1254

Reply via email to