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

Compatibility with existing libraries #5

Closed ericprud closed 2 years ago

ericprud commented 2 years ago

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".

gkellogg commented 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.