convert method
Implementation
Future<RdfDataset> convert(String input, {String? documentUrl}) async {
final preloadedDocuments = <String, JsonValue>{};
final asyncProvider = _options.contextDocumentProvider;
if (asyncProvider != null) {
final root = parseJsonValueOrThrow(input, format: _format);
final seen = <String>{};
await _preloadExternalContexts(
root,
effectiveBaseIri: documentUrl,
seenContextIris: seen,
preloadedDocuments: preloadedDocuments,
);
}
return JsonLdDecoder(
options: JsonLdDecoderOptions(
contextDocumentProvider:
PreloadedJsonLdContextDocumentProvider(preloadedDocuments),
baseUri: _options.baseUri,
expandContext: _options.expandContext,
rdfDirection: _options.rdfDirection,
processingMode: _options.processingMode,
skipInvalidRdfTerms: _options.skipInvalidRdfTerms,
),
iriTermFactory: _iriTermFactory,
format: _format,
).convert(input, documentUrl: documentUrl);
}