JsonLdGraphEncoderOptions constructor

const JsonLdGraphEncoderOptions({
  1. JsonLdOutputMode outputMode = JsonLdOutputMode.compact,
  2. Map<String, String> customPrefixes = const {},
  3. IriRelativizationOptions iriRelativization = const IriRelativizationOptions.full(),
  4. bool generateMissingPrefixes = true,
  5. bool includeBaseDeclaration = true,
  6. bool? useNativeTypes,
  7. bool useRdfType = false,
  8. RdfDirection? rdfDirection,
  9. 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();