json-ld / yaml-ld

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

Collecting JSON-LD file samples #10

Open ioggstream opened 2 years ago

ioggstream commented 2 years ago

I volounteer

To write some round-trip tests with files containing JSON-LD and YAML like the ones I wrote for https://github.com/ietf-wg-httpapi/mediatypes/blob/main/yaml-json-interoperability.yaml

Could you provide/link some of these files (e.g. creating a folder in this repo?)

If you prefer, I can use the https://github.com/ietf-wg-httpapi/mediatypes repo

cc: @msporny @gkellogg @pchampin

gkellogg commented 2 years ago

These files are all derived from the examples in the spec: https://github.com/w3c/json-ld-syntax/tree/main/yaml. The extracted examples from the spec are in https://github.com/w3c/json-ld-syntax/tree/main/examples.

The YAML output is just the process of using the Ruby to_yaml on the parsed JSON.

The Rakefile has a script for extracting the examples, and testing that transformations are equivalent. Doing the same for YAML to JSON-LD should be trivial.