"Could not parse JSONLD" error when importing a JSON-LD file

Thanks for this @neo4jeej. I think I've found what's going on.

The JSON-LD parser in RDF4J does not support json-ld 1.1 processing mode. This happens to be used in the fragment you shared by referring to a remote context (see first line "@context": "https://linked.art/ns/v1/linked-art.json").
It may not be obvious but if you dereference the URI, you'll see that the context includes in the first line the version term definition that makes the parser choke:

{
  "@context": {
    "@version": 1.1,
    "crm": "http://www.cidoc-crm.org/cidoc-crm/",

Unfortunately, there's not much we can do on the n10s side at this point until this is supported in RDF4J :frowning:

Just to confirm the theory I've managed to successfully parse your document with n10s by replacing the reference to the remote context with the actual content excluding the @version element.

{

"@context":  {

"@version": 1.1,

 "crm": "http://www.cidoc-crm.org/cidoc-crm/", 
   ... whole document here ....
} ,

"id": "https://{redacted}.net/2201",

"type": "Type",

Even though it does not solve the problem, I hope it at least helps clarify what's happening.

Cheers,

JB.

1 Like