RDF::T...RDFJSON(3pm)
π RDF::Trine::Parser::RDFJSON β the RDF/JSON parser bestie π
okay so. this is RDF::T...RDFJSON(3pm) from the User Contributed Perl Documentation, and yes the title is literally truncated like that, that's just how the header came in, we don't make the rules π
anyway. it's the RDF/JSON RDF Parser from the RDF::Trine family. sit down, hydrate, let's go π«Ά
β¨ VERSION β¨
this doc describes RDF::Trine::Parser::RDFJSON version 1.019. no cap, that's the one. π
πΈ SYNOPSIS πΈ
the whole vibe in four lines, copy it exactly, don't freestyle:
use RDF::Trine::Parser;
my $parser = RDF::Trine::Parser->new( 'RDF/JSON' );
$parser->parse_into_model( $base_uri, $data, $model );
that's it. that's the whole thing. iconic behaviour honestly β
π¦ DESCRIPTION π¦
...
and that's literally what it says, bestie, i'm not hiding anything from you π the source doc just goes .... sometimes the mystery IS the description. main character energy π§
π METHODS π
beyond the methods documented right here, this class inherits methods from the RDF::Trine::Parser class. so it's giving nepo baby but in a good way, it's got a whole family backing it π
newβ returns a new RDFJSON parser. brand new, fresh out the box, sparkly β¨parse_into_model ( $base_uri, $data, $model [, context => $context] )β parses the bytes in$data, using the given$base_uri. for each RDF statement parsed, it will call$model->add_statement( $statement ). so it reads, it parses, it adds. one at a time. very thorough of it π₯ and yeah, the optionalcontext => $contextbit is there if you want it, brackets mean optional, you know the drill πparse ( $base_uri, $rdf, \&handler )β parses the bytes in$data, using the given$base_uri. it calls thetriplemethod for each RDF triple parsed. here's the tea though: this method does nothing by default π but it can be set by using one of the defaultparse_*methods. so it's a placeholder with potential. we love a glow-up arc π
π BUGS π
found a bug? want a feature? pls don't suffer in silence, report it through the GitHub web interface at:
https://github.com/kasei/perlrdf/issues
they want to hear from you fr fr π«Ά
π AUTHOR π
- Toby Inkster
<tobyink@cpan.org> - Gregory Williams
<gwilliams@cpan.org>
legends, both of them, we stan π
π COPYRIGHT π
Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
tl;dr: free software, same terms as Perl itself, go wild responsibly πΈ
π that's a wrap π
perl v5.38.2, dated 2024-01-13, and that's the whole page bestie β go parse something pretty ππ¦β¨
π¦ 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