From 7cfeb303558593e9efa20df5a02d9b2f7ce42ffa Mon Sep 17 00:00:00 2001
From: Gregg Kellogg
Comments in YAML-LD documents are treated as white space.
- This behavior is consistent with other Linked Data serializations like [[TURTLE]].
+ This behavior is consistent with other Linked Data serializations like [[?TURTLE]].
See Interoperability considerations of [[I-D.ietf-httpapi-yaml-mediatypes]]
for more details.
Encoding
Comments
Conversion to YAML
to YAML begins by preparing an empty representation graph
which will be rooted with either a
YAML mapping or YAML sequence.
+
Although outside of the scope of this specification, processors MAY use YAML directives, including TAG directives, and @@ -1032,29 +1034,19 @@
A concrete proposal in that direction would be to use a tag at the - top-level of any "idiomatic" YAML-LD document, applying to the whole - object/array that makes the document.
- -It might also include a version - to identify the specification that it relates to, allowing - for version announcement that could be used for future-proofing.
- -E.g.
- -- !yaml-ld - $context: http://schema.org/ - $type: Person - name: Pierre-Antoine Champin --
+ The use of `%TAG` directives in YAML-LD is similar to the use + of the `PREFIX` directive in [[?Turtle]] + or the general use of terms as prefixes to create + Compact IRIs in [[JSON-LD11]]: + they not change the meaning of the encoded scalars. +
Conversion to YAML hopefully become unnecessary as implementations are updated. +++ +A concrete proposal in that direction would be to use a tag at the + top-level of any "idiomatic" YAML-LD document, applying to the whole + object/array that makes the document.
+ +It might also include a version + to identify the specification that it relates to, allowing + for version announcement that could be used for future-proofing.
+ +E.g.
+ ++ !yaml-ld + $context: http://schema.org/ + $type: Person + name: Pierre-Antoine Champin ++See for an example of serializing the extended internal representation.
+Converting From the Internal Representation
@@ -1694,7 +1707,7 @@FAQ
Moreover [[JSON]] (and hence [[JSON-LD11]]) does not support comments, and other Linked Data serialization formats - that support comments (such as [[TURTLE]]) + that support comments (such as [[?TURTLE]]) do not provide a means to preserve them when processing and serializing the document in other formats.