implement YAML-LD
Opened this issue · 1 comments
Problem description
JSON-LD is nice, but has too much punctuation. YAML-LD is much easier to read and write by hand.
The YAML-LD CG (part of the JSON-LD CG) was started Jun 2022 json-ld/yaml-ld#3 and a CG spec has been available for about a year.
We already use it in two projects:
- a research project where we parse building regulations and capture them in YAML-LD
- a commercial project where we capture machine state transition rules in YAML-LD
Preferred solution
Implement YAML-LD parsing and serialization.
- here's the spec: https://json-ld.github.io/yaml-ld/spec/
- the content type is application/ld+yaml
- there are tests: https://github.com/json-ld/yaml-ld/tree/main/tests, https://json-ld.github.io/yaml-ld/tests/
Things are very similar to JSON-LD, so it seems logical to extend Titanium (the improved fork that @hmottestad made).
Are you interested in contributing a solution yourself?
None
Alternatives you've considered
No response
Anything else?
No response
One issue with HASMAC JSON-LD (Titanium JSON-LD) is that the code is very tightly coupled with the Jakarta JSON Processing library. There is no intermediary format, so all the processions steps for things like framing or compacting manipulate the Jakarta JSON Processing objects.
We could write an adapter between YAML and the Jakarta JSON Processing library.
Or do an conversion of the YAML text into json text using Jackson and then feed that into HASMAC JSON-LD.