Skip to content

Support for TriG serialization format? #714

@danielbakas

Description

@danielbakas

Description:

TriG (Turtle with Named Graphs) is a W3C standard for serializing RDF datasets with named graphs. It extends Turtle to support multiple graphs in one document.

Current Issue:
Our system wishes to support application/trig in content negotiation but fails during serialization with:

Error: Serialize: Content-type application/trig not supported for data write.

Expected Behavior:
When a client requests to serialize in application/trig, the system should serialize RDF data to TriG.

Current Support:

  • text/turtle (TTL)
  • text/n3 (N3)
  • application/ld+json (JSON-LD)
  • application/trig (TriG) - missing?

Use Case:
TriG is useful for:

  • Multi-graph RDF datasets
  • Linked Data publishing
  • Semantic web applications
  • Knowledge graphs with multiple contexts

Proposed Solution:
Add TriG serialization support to the RDF strategy, similar to existing Turtle/N3 support.

Additional Context:
TriG extends Turtle with named graph syntax:

@prefix ex: <http://example.org/> .

ex:graph1 {
    ex:subject ex:predicate ex:object .
}

ex:graph2 {
    ex:another ex:triple ex:here .
}

Thank you so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions