You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike JSON, YAML keys are not limited to strings, but can be objects.
json-ld/yaml-ld#45 discusses using this for RDF-star, which allows putting annotations on statements.
Here are 2 examples. I use the JSON-like "flow" notation (YAML is really an extension of JSON), if needed I'll restate it in "block" notation:
{$id: bob, age: 42}: {certainty: 0.8, source: Newspaper-1}: "Bob's age is 42, with a certainty of 0.8, as stated in a Newspaper"
{{$id: bob, knows: {$id: alice}}: {certainty: 0.8}}: {claims: ted}: Ted claims that the certainty of Bob knowing Alice is 0.8"
I have zero drawing skills but I'll describe how I'd like the second example to be drawn:
draw {$id: bob, knows: {$id: alice}} as usual and put it in a box
draw a line from the first box to a second box with {certainty: 0.8}
put both in a bigger box
draw a line from the big box to a fourth box with {claims: ted}
The text was updated successfully, but these errors were encountered:
This could be useful for many typical needs in the context of ontology documentation, Linked Open Data, Knowledge Graphs, etc.!
However, note that in the original YAML-LD issue, there are objections against this proposal, too, claiming that there is already a proper way to express this in YAML-LD, see @gkellogg in json-ld/yaml-ld#45 (comment).
So before moving this forward, it would be good to know if there are use cases for this in plain YAML beyond this extension proposal for YAML-LD.
Unlike JSON, YAML keys are not limited to strings, but can be objects.
json-ld/yaml-ld#45 discusses using this for RDF-star, which allows putting annotations on statements.
Here are 2 examples. I use the JSON-like "flow" notation (YAML is really an extension of JSON), if needed I'll restate it in "block" notation:
{$id: bob, age: 42}: {certainty: 0.8, source: Newspaper-1}
: "Bob's age is 42, with a certainty of 0.8, as stated in a Newspaper"{{$id: bob, knows: {$id: alice}}: {certainty: 0.8}}: {claims: ted}
: Ted claims that the certainty of Bob knowing Alice is 0.8"I have zero drawing skills but I'll describe how I'd like the second example to be drawn:
{$id: bob, knows: {$id: alice}}
as usual and put it in a box{certainty: 0.8}
{claims: ted}
The text was updated successfully, but these errors were encountered: