digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.66k stars 195 forks source link

Implement just-in-time context resolution. #342

Closed dlongley closed 4 years ago

dlongley commented 4 years ago

This PR removes the preprocessing step for resolving contexts and replaces its functionality with JIT context resolution. This should fix problems with mutating JSON literal content. This feature also allows document loaders to return an additional tag property that jsonld.js can use to more efficiently cache and reuse already processed contexts.

dlongley commented 4 years ago

@gkellogg,

Presumably, base is handled properly per recent tests.

The tests pass -- including the URL resolution follows RFC3986 ones.