Closed ericprud closed 2 years ago
The transformation is really between Infra INFRA and the JSON-LD internal representation. Specifying how the internal format is transformed to and from YAML should be fairly tractable. But, practically speaking, it's a solved problem for most languages.
As noted elsewhere, reading can pretty much be contained within the document loader, and writing requires a straightforward insertion of substitution of steps described in the API.
My experience with ShExJ as YAML has indicated no difference in the way some libraries, e.g. js-yaml, and tools, e.g. json2yaml.com, map JSON to YAML, at least as far as semantics go (perhaps not as far as which things get quoted and line wraps vs. '\n's). A survey of corner cases would help reveal if there's already a tacit "standard".