JsonLdGraphEncoderOptions constructor
const
JsonLdGraphEncoderOptions({
- JsonLdOutputMode outputMode = JsonLdOutputMode.compact,
- Map<
String, String> customPrefixes = const {}, - IriRelativizationOptions iriRelativization = const IriRelativizationOptions.full(),
- bool generateMissingPrefixes = true,
- bool includeBaseDeclaration = true,
- bool? useNativeTypes,
- bool useRdfType = false,
- RdfDirection? rdfDirection,
- Object? compactionContext,
Creates a new JSON-LD encoder options object
outputMode The output mode for JSON-LD encoding. Defaults to
JsonLdOutputMode.compact.
customPrefixes A map of prefix to namespace URI pairs that will be used
in the JSON-LD @context. These prefixes take precedence over standard prefixes
if there are conflicts.
generateMissingPrefixes When true (default), the encoder will automatically
generate prefix declarations for IRIs that don't have a matching prefix.
includeBaseDeclaration Whether to include base URI declarations in the output.
Defaults to true if not provided.
Implementation
const JsonLdGraphEncoderOptions({
this.outputMode = JsonLdOutputMode.compact,
super.customPrefixes = const {},
super.iriRelativization = const IriRelativizationOptions.full(),
this.generateMissingPrefixes = true,
this.includeBaseDeclaration = true,
this.useNativeTypes,
this.useRdfType = false,
this.rdfDirection,
this.compactionContext,
}) : super();