Skip to main content

LDParser class

LDParser can parse JSONLD schema according to specification

LDParser

Signature:

export declare class LDParser 

Methods

MethodModifiersDescription
extractTerms(context)staticExtractTerms returns the terms definitions from the JSON-LD context
getPrefixes(context, onlyCommonPrefixes, properties)static

GetPrefixesreturns a map of potential RDF prefixes based on the JSON-LD Term Definitions in this context. No guarantees of the prefixes are given, beyond that it will not contain ":".

onlyCommonPrefixes: If true, the result will not include "not so useful" prefixes, such as "term1": "http://example.com/term1", e.g. all IRIs will end with "/" or "#". If false, all potential prefixes are returned.