Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter shows incorrect warning for typed literal values #22

Open
RinkeHoekstra opened this issue Sep 1, 2021 · 0 comments
Open

Linter shows incorrect warning for typed literal values #22

RinkeHoekstra opened this issue Sep 1, 2021 · 0 comments

Comments

@RinkeHoekstra
Copy link

Linter shows:

  • Usage of JSON-LD syntax token "type" in the JSON-LD object type of "GraphObject" is invalid, or
  • Usage of JSON-LD syntax token "@value" in the JSON-LD object type of "NodeObject" is invalid

in cases where the JSON-LD contains a typed datatype value, e.g.:

{
    "@context": {
        "ex": "http://example.com/"
    },
    "@id": "ex:test123",
    "ex:myAttribute": {
        "@value": "123",
        "@type": "ex:myDataType"
    }
}

But this is perfectly valid, as it is the mechanism for assigning a datatype to a literal. See https://www.w3.org/TR/json-ld11/#typed-values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant