Skip to content

Default namespace for plain old JSON in 1.2 (?) #759

Open
@melvincarvalho

Description

@melvincarvalho

Thinking about JSON-LD v.next one thing that comes up quite often in the developer experience is that it's quite a heavy lift for users starting out to create a context, a vocab, and adding URI, for every predicate (ie json key/attribute)

This could be mitigated by having a default namespace for keys that are "plain old JSON"

Or a parser could "make up" a namespace to translate keys into triples, and make them portable, queryable etc.

This can be done using @base too, but the issue with this is that everyone will make up a different base

What would be helpful would be a default namespace at spec level so that different implementers that want this feature would have a consistency of data

It would not even need to be mandated, even something that is slightly hinted at could be the basis of allowing parsers to consume much more data in the wild, as well as data that's not perfectly formed (principle of tolerance). It would be seamlessly backwards compatible

It would just need to be something that consensus could be formed around, in such a way that no one has a hard objection to it. If you dont want to use it, you dont have to.

Example: urn:json:key:foo -- though that might be a bit verbose and the IETF may take issue with "json" not being an organization

I actually really dont mind at all what form it takes, just as long as it's hinted at in the spec, in a primer, or even in a github issue. Then it's possible to write parsers with slightly more peace of mind

I wonder, could this be something for consideration in JSON-LD 1.2?

Edit: putting a hint in the best practices could be a good solution here

Metadata

Metadata

Assignees

No one assigned

    Labels

    best-practicesdeferIssue deferred to future Working Group

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions