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

YAML versions #21

Closed VladimirAlexiev closed 2 years ago

VladimirAlexiev commented 2 years ago

Which YAML versions should YAML-LD support?

ioggstream commented 2 years ago

MUST 1.2.2

MAY some sensible features of YAML 1.1

VladimirAlexiev commented 2 years ago

@ioggstream wrote

In YAML 1.2, all valid JSON parses to valid YAML. When discussing with YAML folks, they told me that this cannot be guaranteed for YAML 1.3

"Cannot be guaranteed" is troubling. But also I cannot imagine how that can be, if YAML 1.3 is backward compatible with YAML 1.2.2. Should we worry about this potential future YAML 1.3 version?

ioggstream commented 2 years ago

"Cannot be guaranteed" is troubling.

Theoretically, you must parse YAML document with a YAML parser, and a JSON document with a JSON document. iiuc trouble should arise only when there's a JSON document that cannot be mapped to a YAML representation graph.

Should we worry about this potential future YAML 1.3 version?

My opinion is that , given the implementation base, this won't happen. OTOH in mediatype we are just relying on the fact that JSON data and document structures are a subset of YAML's ones.

ioggstream commented 2 years ago

I'm stubbing a PR based on the YAML work:

VladimirAlexiev commented 2 years ago

I like the decision to fix the version to 1.2.2, so I'll close this. But @ioggstream I have some comments on the above commit.