That one works for me as well with

  riot --out TTL ~/tmp/D.jsonld

==>
@prefix dc:  <http://purl.org/dc/elements/1.1/> .
@prefix dcterms:  <http://purl.org/dc/terms/> .

_:b0    dc:identifier    "1234" ;
        dcterms:subject  <https://finto.fi/koko/fi/page/p57158> ;
        dcterms:subject  <https://finto.fi/koko/fi/page/p57159> .

    Andy

On 02/01/18 15:06, Mikael Pesonen wrote:

Also tried with context

{
      "dc:identifier": "1234",
      "dcterms:subject": [
          "https://finto.fi/koko/fi/page/p57158";,
          "https://finto.fi/koko/fi/page/p57159";
      ],
      "@context": {
          "dc": "http://purl.org/dc/elements/1.1/";,
          "dcterms": "http://purl.org/dc/terms/";,
         "dcterms:subject":
         {
           "@id": "http://purl.org/dc/terms/subject";,
           "@type": "@id"
         }
      }
}

and getting

Error 400: Parse error: [line: 13, col: 17] Unexpected character (':' (code 58)): was expecting comma to separate Object entries


Fuseki - version 3.6.0 (Build date: 2017-12-13T21:13:34+0000)

Br,


On 2.1.2018 16:03, Andy Seaborne wrote:
Hi Mikael,

Jena v3.6.0 and several earlier versions I tried parses that input just fine. Jena use "jsonld-java".

-----------------------
@prefix dc:  <http://purl.org/dc/elements/1.1/> .
@prefix dcterms:  <http://purl.org/dc/terms/> .

_:b0    dc:identifier    "1234" ;
        dcterms:subject <https://finto.fi/koko/fi/page/p57158> ;
        dcterms:subject <https://finto.fi/koko/fi/page/p57159> .
-----------------------

which agrees with the JSON playground.

Which version are you using?

    Andy

On 02/01/18 12:36, Mikael Pesonen wrote:

Hi,

following JSON-LD insert gives error in Jena

{
     "dc:identifier": "1234",
     "dcterms:subject": [
         { "@id": "https://finto.fi/koko/fi/page/p57158"; },
         { "@id": "https://finto.fi/koko/fi/page/p57159"; }
     ],
     "@context": {
         "dc": "http://purl.org/dc/elements/1.1/";,
         "dcterms": "http://purl.org/dc/terms/";
     }
}

Error 500: Parse error: [line: 5, col: 8 ] Unexpected character (':' (code 58)): was expecting comma to separate Array entries


So in this case putting several links to dcterms:subject can't be done?

Is only way to handle this to describe datatypes in @context section? Is it possible to do automatically somehow, since Dublin Core is a well defined schema (at least should be).

{
     "dc:identifier": "1234",
     "dcterms:subject": [
         "https://finto.fi/koko/fi/page/p57158"; ,
         "https://finto.fi/koko/fi/page/p57159";
     ],
     "@context": {
         "dc": "http://purl.org/dc/elements/1.1/";,
         "dcterms": "http://purl.org/dc/terms/";
... add datatype descriptions for dcterms:subject here
     }
}

Thanks



Reply via email to