json-ld / yaml-ld

CG specification for YAML-LD and UCR
https://json-ld.github.io/yaml-ld/spec
Other
19 stars 8 forks source link

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

Closed micheldumontier closed 1 year ago

micheldumontier commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

ok, this is an acceptable compromise :)

gkellogg commented 1 year ago

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.