Skip to content

@type as an array allowed for literals #568

@Tpt

Description

@Tpt

[Sorry, this might be duplicated, I have not read the list of open issues carefully]

When given the following JSON-Ld, jsonld.js returns an invalid RDF triple, contenating the two literal datatypes with a ,:

{
  "@id": "http://example.com/s",
  "http://example.com/s": {
    "@value": "foo",
    "@type": ["http://example.com/bar", "http://example.com/baz"]
  }
}
<http://example.com/s> <http://example.com/s> "foo"^^<http://example.com/bar,http://example.com/baz> .

Json-ld.org playground

I guess it should be a syntax error instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions