trig top-level property

TriGCodec trig
final

Global convenience variable for working with TriG format

This variable provides direct access to a pre-configured TriG codec for easy encoding and decoding of TriG data without needing to create a codec instance manually.

Example:

final dataset = trig.decode(trigString);
final serialized = trig.encode(dataset);

For custom configuration, you can create a new codec with specific options:

final customTrig = TriGCodec(
  namespaceMappings: myNamespaces,
  encoderOptions: TriGEncoderOptions(generateMissingPrefixes: false),
);

Implementation

final trig = TriGCodec();