filip26 / titanium-json-ld

A JSON-LD 1.1 Processor & API
https://apicatalog.com
Apache License 2.0
134 stars 33 forks source link

Support language private subtags #232

Closed tkgesis closed 2 years ago

tkgesis commented 2 years ago

Describe the bug When rendering n-quads from json-ld, items containing lists only output one instead of all items.

To Reproduce

Call in java:

            JsonArray rdfStar = JsonLd.expand(urlToJsonLD).rdfStar().get();

            RdfDataset rdfDataset = JsonLd.toRdf(JsonDocument.of(rdfStar)).get();

            StringWriter stringWriter = new StringWriter();
            Rdf.createWriter(com.apicatalog.jsonld.http.media.MediaType.N_QUADS,
                    stringWriter).write(rdfDataset);
Sample item with list as value
"Terms": [
  {
    "@language": "woi",
    "@value": "Muut=ak"
  },
  {
    "@language": "en-x-lgr",
    "@value": "citrus=DEF"
  }
]

Expected behavior The list of n-quads contains statement for each item of the list

Additional context Tested with jdk 11, with & without prior expansion.

filip26 commented 2 years ago

see RFC 5646 2.2.7 - Private Use Subtags