@ldf/datasource-jsonld

3.2.1 • Public • Published

Linked Data Fragments Server - JSON-LD Datasource

npm version

This module contains a JSON-LD datasource for the Linked Data Fragments server. It allows JSON-LD files to be loaded.

This package is a Linked Data Fragments Server module.

Usage in @ldf/server

This package exposes the following config entries:

  • JsonLdDatasource: A JSON-LD datasource that requires at least one file field. Should be used as @type value.

Example:

{
  "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/server/^3.0.0/components/context.jsonld",
  "@id": "urn:ldf-server:my",
  "import": "preset-qpf:config-defaults.json",

  "datasources": [
    {
      "@id": "urn:ldf-server:myJsonLdDatasource",
      "@type": "JsonLdDatasource",
      "datasourceTitle": "My JSON-LD file",
      "description": "My dataset with a JSON-LD back-end",
      "datasourcePath": "myjsonld",
      "file": "path/to/file.jsonld"
    }
  ]
}

Usage in other packages

When this module is used in a package other than @ldf/server, then the JSON-LD context https://linkedsoftwaredependencies.org/contexts/@ldf/datasource-jsonld.jsonld must be imported.

For example:

{
  "@context": [
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/core/^3.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/preset-qpf/^3.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/datasource-jsonld/^3.0.0/components/context.jsonld",
  ],
  // Same as above...
}

License

The Linked Data Fragments server is written by Ruben Verborgh, Miel Vander Sande, Ruben Taelman and colleagues.

This code is copyrighted by Ghent University – imec and released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @ldf/datasource-jsonld

Weekly Downloads

15

Version

3.2.1

License

MIT

Unpacked Size

6.68 kB

Total Files

8

Last publish

Collaborators

  • rubenverborgh
  • rubensworks