Ttl => 'Turtle',
N3 => 'Notation3',
Xml => 'RDFXML',
XML => 'RDFXML',
Json => 'RDFJSON',
);
has type => (
is => 'ro',
coerce => sub { my $t = ucfirst($_[0]); $TYPE_ALIAS
porter::RDF>
Serialize RDF data (as RDF/XML, RDF/JSON, Turtle, NTriples, RDFa...)
=item L<Catmandu::Importer::RDF>
Parse RDF data (RDF/XML, RDF/JSON, Turtle, NTriples...) or import from a SPARQL
en
e RDF::Query;
use RDF::LDF;
use RDF::aREF;
use RDF::aREF::Encoder;
use RDF::NS;
use IO::Pipe;
use JSON;
use LWP::UserAgent::CHICaching;
our $VERSION = '0.32';
with 'Catmandu::RDF';
with 'Catmandu::I
de($pipe,':encoding(UTF-8)');
return sub {
state $line = <$pipe>;
return decode_json($line) if defined($line);
waitpid($pid,0);
return undef;
};
}
else {
#
is_literal ? $triple->object->literal_datatype : undef;
# Create the RDF::Trine type RDF/JSON RDF::aREF can parse
my $hashref = {};
$hashref->{$subject}->{$predicate}->[0]->{
e aliases C<ttl> for C<Turtle>, C<n3> for
C<Notation3>, C<xml> and C<XML> for C<RDFXML>, C<json> for C<RDFJSON>.
When the option C<type> is set to 'NTriples' the export can be streamed in all
other