Skip to content

Language map with global context #126

@Murloc6

Description

@Murloc6

We are trying to round trip json-ld with framing.

Our input json-ld document is:

{
  "@context": [
    {
      "@language": "en"
    },
    {
      "title": {
        "@id": "dct:title"
      },
      "titles": {
        "@id": "dct:title",
        "@container": "@language"
      }
    }
  ],
  "title": "myTitle"
}

We obtain the following triple:

_:b0 <dct:title> "myTitle"@en .

When we try to frame the data back, with round tripping, we get this result :

{
  "@context": [
    {
      "@language": "en"
    },
    {
      "title": {
        "@id": "dct:title"
      },
      "titles": {
        "@id": "dct:title",
        "@container": "@language"
      }
    }
  ],
  "titles": {
    "en": "myTitle"
  }
}

You can observe that title is transformed into titles since the input triple contain a language tag. Even though the context contains a global @language. We would expect the output to be the same as the input. It means that if there is a global @language defined in the context, the value should be defined with title and not a language map.

jsonld playground

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Future Work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions