from static method

JsonLdDecoderOptions 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 JsonLdDecoderOptions instance, they are returned as-is. Otherwise, a new instance with default settings is created.

Implementation

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