Files
scaenae/js/ontology.js
2026-04-07 16:45:28 +02:00

17 lines
363 B
JavaScript

/**
* @module Ontology
*/
/**
* Load an ontology from its JSON description
* @param {String} jsonPath The path (URI) of the ontology JSON file
* @returns {Object}
*/
export async function loadOntology(jsonPath) {
const ontology = await fetch(jsonPath)
.then(res => res.json())
.catch(err => console.error(err));
return ontology;
}