Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of "@" in a yaml spec #85

Closed
micheldumontier opened this issue Sep 20, 2022 · 3 comments
Closed

get rid of "@" in a yaml spec #85

micheldumontier opened this issue Sep 20, 2022 · 3 comments
Labels
question Further information is requested

Comments

@micheldumontier
Copy link

I was pleased to learn about this effort to facilitate encoding of LD with YAML... i enjoy writing yaml in my editor. what i don't enjoy is making special syntactic adjustments because of special symbols introduced that require quotes around keys like '@context' or '@graph'. why not just use context: or graph: ? make these reserved symbols, and keep the writing simple.

@gkellogg
Copy link
Member

After discussion, the current idea is for a Best Practices document to encourage using a Convenience Context that defines the bare-word equivalents of the @ keywords.

There are a number of other vocabularies (e.g., schema.org) that define equivalents. In general because of the potential for stepping on another namespace, we cannot categorically just do away with @ keywords, in either JSON-LD or YAML-LD.

Using this would be something like the following:

%YAML 1.2
---
"@context":
  - "@vocab": http://example.org
  - "https://json-ld.org/contexts/convenience
id: foo
type: Bar

Note that @context, itself, cannot be aliased, neither can keys used within a context definition.

@micheldumontier
Copy link
Author

ok, this is an acceptable compromise :)

@gkellogg
Copy link
Member

I'll close with reference to #55 and #11.

We still need to describe this and figure out when and where to publish the referenced convenience context.

@gkellogg gkellogg added the question Further information is requested label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants