Skip to content

Add loader option for custom context loader logic #11

Open
@bergos

Description

jsonld.js and jsonld-streaming-parser.js offer an option to use a custom loader code to fetch a context given as URL. This option should be forwarded.

A very common use case could be caching on the file system or a context bundled with a web application. An additional option could be added to define a URL + file path map or URL + object map. If that option is given, a loader for the map will be used.

jsonld.js and jsonld-streaming-parser.js call the option documentLoader, but actually it's only used for the context. I would propose to call the option contextLoader.

The map option would be accordingly contextMap.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions