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.
Add optional tag feature processing to returned RemoteDocuments.
A tag will be understood to mean that the same context document
needn't be processed twice. A special tag value of static is
interpreted to mean that a context does not even need to be retrieved
more than once.
Enables greater reuse of already processed contexts and quicker
discovery (via static tag) of already processed contexts for
a given context URL (instead of requiring the context content
itself to be seached for and found in a cache, only its URL
needs to be found).
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.tag
feature processing to returned RemoteDocuments. Atag
will be understood to mean that the same context document needn't be processed twice. A specialtag
value ofstatic
is interpreted to mean that a context does not even need to be retrieved more than once.static
tag) of already processed contexts for a given context URL (instead of requiring the context content itself to be seached for and found in a cache, only its URL needs to be found).