w3c / json-ld-api

JSON-LD 1.1 Processing Algorithms and API Specification
https://w3c.github.io/json-ld-api/
Other
73 stars 29 forks source link

LoadDocumentCallback isn't passed into the algorithms that use it #580

Open jyasskin opened 7 months ago

jyasskin commented 7 months ago

https://www.w3.org/TR/json-ld-api/#algorithm uses a LoadDocumentCallback in two places, but its interface doesn't say any such callback should be passed in.

gkellogg commented 7 months ago

The document loader is provided as an API option, and the API options are considered to be generally accessible to the algorithms. This is described in terms of the LoadDocumentCallback which is considered a global for the algorithms, but it either uses a default implementation, or that specified from the documentLoader API option.

jyasskin commented 7 months ago

So if another specification, like https://www.w3.org/TR/vc-data-integrity/#verify-proof, wants to parse JSON-LD, should it go through the API rather than the algorithms?