RDF::T...RDFJSON(3pm)
RDF::Trine::Serializer::RDFJSON π β¨
okay bestie, so this is the RDF/JSON Serializer from the RDF::Trine::Serializer crew β it's a page from the User Contributed Perl Documentation, and it's giving "let me turn your RDF graphs into RDF/JSON for you" energy. π¦
VERSION π
This doc describes RDF::Trine::Serializer::RDF/JSON version 1.019. periodt.
SYNOPSIS β¨
use RDF::Trine::Serializer::RDFJSON;
my $serializer = RDF::Trine::Serializer::RDFJSON->new();
like... that's it. that's the whole vibe. make one, use it. π
DESCRIPTION πΈ
So the RDF::Trine::Serializer::Turtle class (yes bestie, the description literally says Turtle, we are NOT editing that, it's canon, iykyk π«Ά) provides an API for serializing RDF graphs to the RDF/JSON syntax.
METHODS π
ngl, this class is not doing all the work alone β beyond the methods documented down here, it inherits methods from the RDF::Trine::Serializer class. so go read that one too, bestie, it's the main character. π
newβ returns a new serializer object. fresh out the box, iconic, no notes. β¨serialize_model_to_file ( $file, $model [,\%json_options] )β serializes the$modelto RDF/JSON and prints the results out to the$filehandle you handed it. and the%json_options? that's an options hash suitable forJSON::to_json. lowkey flexible. πserialize_model_to_string ( $model [,\%json_options] )β same idea, except instead of writing to a file it serializes the$modelto RDF/JSON and hands you back the result as a string. very "send it in the group chat" of it. π
heads up: for both of those,%json_optionsis an options hash suitable forJSON::to_json. yes i said it twice because the original said it twice. consistency slay. π
BUGS π
found a bug? got a feature request? don't suffer in silence bestie β please report any bugs or feature requests through the GitHub web interface at:
https://github.com/kasei/perlrdf/issues
we love a paper trail. π
SEE ALSO π₯
http://n2.talis.com/wiki/RDF_JSON_Specification
like, the actual spec. the source material. go read it if you want the deep lore. β
AUTHOR π«Ά
- Toby Inkster
<tobyink@cpan.org> - Gregory Williams
<gwilliams@cpan.org>
two absolute legends, respectfully. π
COPYRIGHT π
Copyright (c) 2010 Toby Inkster. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie, no cap. this gem was brought to you by perl v5.38.2, dated 2024-01-13, straight from the RDF::T...RDFJSON(3pm) manual. mwah. πβ¨π
π¦ where this page comes from
- debian trixie: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms