Language maps and undefined language

All,

As work progresses towards 1.1, is there interest in the issue described in
this thread:

https://lists.w3.org/Archives/Public/public-linked-json/2016Sep/0007.html

To recap:

If a string is associated with a property defined as a languageMap, but
does not have a language associated with it, it creates two keys in the
JSON ... the langStrings go in one, and the non-langStrings in another.
This is unintuitive and exposes some of the weirdest weirdness of RDF
(langStrings) to unsuspecting JSON developers.


A proposal to discuss:

If compaction would result in an attempt to add a string without an
associated language into a LanguageMap, then the processor SHOULD assign
the undefined language code `UND` as the key in the array.

Thus,
_:x rdfs:label "Fish"@en, "Poisson"@fr, "51234" .

Would result in:

{
  "@id": "_:x",
  "label": {"en": "Fish", "fr": "Poisson", "UND": "51234"}
}

Rather than the current compaction result:

{
  "@id": "_:x",
  "label": {"en": "Fish", "fr": "Poisson"},
  "rdfs:label": "51234"
}


Notes:

* PHP does not support "" as a key in a dictionary, and thus UND as the key
* This does not propose an inverse expansion rule, in case someone has an
explicit @UND langString [seems unlikely], where it should not become a
regular xsd:string


References:

  https://github.com/digitalbazaar/jsonld.js/issues/151
  https://github.com/IIIF/iiif.io/issues/755


Thoughts?

Rob

-- 
Rob Sanderson
Semantic Architect
The Getty Trust
Los Angeles, CA 90049

Received on Monday, 10 April 2017 16:45:46 UTC