WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions