RDF::R...alizer(3pm)

πŸ’– RDF::Redland::Serializer β€” the Redland RDF Serializing to Syntax Class πŸ’–

Okay so bestie, welcome to RDF::Redland::Serializer(3pm) β€” literally the glow-up station where your RDF graphs get turned into pretty syntax. This is the page for the serializing-to-syntax class in the RDF::Redland fam, and no cap, it's giving "make my triples look cute in every format" energy. πŸ¦‹


✨ SYNOPSIS ✨

Like, the whole vibe in four lines, okay?

use RDF::Redland;

...
my $serializer=new RDF::Redland::Serializer("ntriples");

$serializer->serialize_model_to_file("foo.rdf", $base_uri, $model);

Obsessed. You make a serializer, you hand it a model, it writes the file. Periodt. πŸ’…


🌸 DESCRIPTION 🌸

So this class represents serializers β€” little machines that turn RDF graphs into various syntaxes. And where do the graphs come from? From an RDF::Redland::Model object, bestie. That's the source. That's the whole tea. πŸ«–


πŸŽ€ CONSTRUCTORS πŸŽ€

  • new [NAME [MIME_TYPE [URI]]] β€” makes a brand-new RDF::Redland::Serializer object for a syntax serializer that goes by NAME, with MIME Type MIME_TYPE and/or URI URI. Now here's the flexible part: any of those fields can be undef, or you can just not pass them at all. And if you're feeling minimalist and omit all of them? The default serializer gets used, which currently is 'ntriples'. ✨

πŸ’… METHODS πŸ’…

  • serialize_model_to_file FILENAME BASE_URI MODEL β€” serializes the RDF Graph MODEL as syntax, using the base RDF::Redland::URI BASE_URI, and writes it all out to the file FILENAME. Model in, file out, iconic behavior. πŸ“
  • serialize_model_to_string BASE-URI MODEL β€” serializes the RDF Graph MODEL into a syntax. And heads up, bestie: if no serializer name is given, the default serializer RDF/XML is used. 🧚
  • set_namespace PREFIX URI β€” defines a namespace URI with the PREFIX you supply, so it can be used when serializing an RDF Graph. Name your namespaces, they deserve it. 🏷️
  • feature URI [VALUE] β€” get or set a serializer feature. The feature is named via the RDF::Redland::URI URI, and the value is a string. If you pass VALUE, the feature gets set to that value; if you don't, you just get the current value back. Get/set, the classic duality. ⭐

🌈 SEE ALSO 🌈

Go read these next, iykyk:

  • RDF::Redland::Parser
  • RDF::Redland::URI

πŸ‘‘ AUTHOR πŸ‘‘

This legend right here:


πŸ’€ Real talk: this whole page came from the perl v5.42.3 era, dated 2026-08-20, and the manpage title it lives under is the slightly-truncated RDF::R...alizer(3pm) β€” but you and me both know her full name is RDF::Redland::Serializer(3pm). Slay. πŸ’–
πŸ“¦ where this page comes from