Hi,

Are the output "flavors" for JSON-LD 1.0 only then?
https://jena.apache.org/documentation/io/rdf-output.html#json-ld

On Fri, Mar 11, 2022 at 11:39 AM Andy Seaborne <a...@apache.org> 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 is not a problem with Titanium.
>
> See example code that uses only the plain java.net.http package.
>
>    https://issues.apache.org/jira/browse/JENA-2306
>
> HTTP/2 works for java 17.0.2, but does not work for java 11.0.14.
>
> And that means { "@context": "https://schema.org/"; } does not work.
>
> (http: redirects to that as well)
>
> This _may_ be:
> https://bugs.openjdk.java.net/browse/JDK-8218546
>
> in which case it is fixed in java 11.0.15.
>
> In my testing, it wasn't just google HTTP/2 sites.
>
> ** Please try the example code and report the Java version and what happens.
>
> 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.
>
> Or should Jena only write some plain output and expect the application
> to further transform it?
>
> Even for this, it needs some improvement so that there is a @context to
> work from.
>
> ** Can you contribute here? The code is in JsonLD11Writer.java.
>
>      https://issues.apache.org/jira/browse/JENA-2153
>
>      Andy

Reply via email to