json-ld/yaml-ld

get rid of "@" in a yaml spec

micheldumontier opened this issue · 3 comments

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.

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.

ok, this is an acceptable compromise :)

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.