yaml-ld icon indicating copy to clipboard operation
yaml-ld copied to clipboard

Convert JSON-LD to YAML-LD using standard YAML libraries

Open pchampin opened this issue 3 years ago • 3 comments

As a developer, I want to be able to convert JSON-LD documents to YAML-LD by simply serializing the document using any standard YAML library, So that the resulting YAML is valid YAML-LD, resolving to the same graph as the original JSON-LD.

Conversely, I would be very surprised (and annoyed) if such a simple conversion did not work.

This is why, although I do not oppose $-keywords (#11) for authoring YAML-LD from scratch, I want @-keywords to be also supported.

pchampin avatar May 30 '22 12:05 pchampin

Having worked with this, and some standard YAML libraries in Ruby, I think we want to tread lightly and reduce requirements to basic/expanded profile considerations:

In the Basic Profile:

  • No use of anchors or alias nodes. Standard JSON types only (YAML JSON Schema) (see #13)
  • No use of tags or tag definitions (see #17)
  • Optional document start/end markers
  • Optional #YAML 1.2 announcement
  • Single document only (see #63)

In the Extended Profile:

  • Optional use of anchors and alias nodes (finding equivalent nodes may be challenging) (see #13)
  • Optional multiple documents in stream (after figuring out what this means for us) (see #63)
  • Optional extended datatypes (Date and DateTimes) (see #17)

These should allow the simple use of existing libraries for turning the Internal Representation into YAML with standard controls.

gkellogg avatar Aug 01 '22 21:08 gkellogg

This issue was discussed on the Aug 03 meeting.

gkellogg avatar Aug 03 '22 17:08 gkellogg

This issue was discussed in the August 17th meeting.

General feel that it can be merged, but more detail is still necessary.

(Really for #70, duplicated there.)

gkellogg avatar Aug 17 '22 20:08 gkellogg