Closed anatoly-scherbakov closed 10 months ago
I guess my statement above is incorrect; expand()
is an operation specified by JSON-LD API, thus a conforming implementation must have that operation. I will have to write a separate library for this purpose, something like this:
import yaml_ld
yaml_ld.expand(…)
Right, that's why the test type includes jld:ExpandTest
, which indicates the algorithm to use. Of course, comments will be removed in the change to the Internal Representation.
Manifest:
This test asks us to do an expansion for
cr-comments-1-positive-in.yamlld
and compare the result againstcr-comments-1-positive-out.yamlld
.In the current state of the spec, we do not define an
expand()
operation that would be different from JSON-LD expansion, do we?I am working on a YAML-LD plugin for https://github.com/rdflib/rdflib and there is no such operation there, there is only YAML-LD parsing into an RDF graph or export of a graph as YAML-LD.
Proposal. Use
.nq
output instead of.yamlld
and compare triples resulting from parsing the file.