from static method

JsonLdGraphDecoderOptions from(
  1. RdfGraphDecoderOptions options
)

Creates a JSON-LD decoder options object from generic RDF decoder options

This factory method ensures that when generic RdfGraphDecoderOptions are provided to a method expecting JSON-LD-specific options, they are properly converted.

If the provided options are already a JsonLdGraphDecoderOptions instance, they are returned as-is. Otherwise, a new instance with default settings is created.

Implementation

static JsonLdGraphDecoderOptions from(RdfGraphDecoderOptions options) =>
    switch (options) {
      JsonLdGraphDecoderOptions _ => options,
      _ => const JsonLdGraphDecoderOptions(),
    };