Skip to content

Forward slash in JSON key treated as error #543

Open
@jakubklimek

Description

@jakubklimek

A forward slash in JSON key like this:

{
  "@context": {
    "@version": 1.1,
    "a/b": "https://a"
  }
}

is treated as bad syntax: jsonld.SyntaxError: Invalid JSON-LD syntax; term in form of IRI must expand to definition.
However, forward slash is perfectly valid in JSON.
Where does this syntax error come from?

{
  "@context": {
    "@version": 1.1,
    "a_b": "https://a"
  }
}

is OK.

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