Skip to content

Revisit empty string as term #584

@gkellogg

Description

@gkellogg

JSON-LD has a restriction that terms must not be the empty string

From JSON-LD Syntax 6.1:

Furthermore, the term MUST NOT be an empty string ("") as not all programming languages are able to handle empty JSON keys.

IIRC, this was added due to an issue in an earlier version of PHP, and I suspect it is no longer an issue. Furthermore, the use of empty prefixes is common in other RDF syntaxes, so allowing it here for 1.1 documents would be reasonable, if tooling supports it.

As evidence, consider this stackoverflow question.

Also, note that while the syntax document makes such a normative statement, the API algorithms don't call this out as an error condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions