Another RDF Encoding Form (aREF)
Jakob Voß (VZG)

SWIB2013 Lightning Talk, 2013-11-27
Another RDF Encoding Form?

aREF = JSON-LD light + Turtle light
Based on maps, strings, and arrays like JSON
Easy literals like Turtle:
"literal@language-tag"
"literal^data:type"
What’s wrong with existing serializations?

RDF/XML is awful
RDF/JSON is too verbose
Turtle is one big string (parsing required)
JSON-LD is complex (13 keywords WTF?!)
None of them are good for writing RDF data right in your code.
Purpose of aREF

Read and write RDF data in any code or data structures
(JSON, YAML, INI files, Perl code, Ruby, Phython. . . .)
aREF
Serialization <--> List-Map-Structures <==> RDF Triples
(e.g. YAML)
(data structure)
Example 1: Serialization in YAML

_id:
http://example.com/people#john
foaf:name: John Smith
foaf:age:
41^xsd:integer
foaf:homepage:
- _id: http://personal.example.org/
dct:modified: 2010-05-29^xsd:date
- http://work.example.com/jsmith/
dct:description: a nice guy@en
foaf:knows:
foaf:name: Alice
Example 2: Serialization in Perl-Code
$rdf = {
_id
=> ’http://example.com/people#john’,
foaf_name => ’John Smith’,
foaf_age => ’41^xsd:integer’,
foaf_homepage => [
{
_id => ’http://personal.example.org/’,
dct_modified => ’2010-05-29^xsd:date’,
},
’http://work.example.com/jsmith/’,
],
dct_description => ’a nice guy@en’,
foaf_knows => { foaf_name => "Alice" },
};
Getting started

Current specification and issue tracker
http://gbv.github.io/aREF/
Preliminary implementation in Perl:
https://metacpan.org/release/Catmandu-RDF
Feedback welcome!

Another RDF Encoding Form

  • 1.
    Another RDF EncodingForm (aREF) Jakob Voß (VZG) SWIB2013 Lightning Talk, 2013-11-27
  • 2.
    Another RDF EncodingForm? aREF = JSON-LD light + Turtle light Based on maps, strings, and arrays like JSON Easy literals like Turtle: "literal@language-tag" "literal^data:type"
  • 3.
    What’s wrong withexisting serializations? RDF/XML is awful RDF/JSON is too verbose Turtle is one big string (parsing required) JSON-LD is complex (13 keywords WTF?!) None of them are good for writing RDF data right in your code.
  • 4.
    Purpose of aREF Readand write RDF data in any code or data structures (JSON, YAML, INI files, Perl code, Ruby, Phython. . . .) aREF Serialization <--> List-Map-Structures <==> RDF Triples (e.g. YAML) (data structure)
  • 5.
    Example 1: Serializationin YAML _id: http://example.com/people#john foaf:name: John Smith foaf:age: 41^xsd:integer foaf:homepage: - _id: http://personal.example.org/ dct:modified: 2010-05-29^xsd:date - http://work.example.com/jsmith/ dct:description: a nice guy@en foaf:knows: foaf:name: Alice
  • 6.
    Example 2: Serializationin Perl-Code $rdf = { _id => ’http://example.com/people#john’, foaf_name => ’John Smith’, foaf_age => ’41^xsd:integer’, foaf_homepage => [ { _id => ’http://personal.example.org/’, dct_modified => ’2010-05-29^xsd:date’, }, ’http://work.example.com/jsmith/’, ], dct_description => ’a nice guy@en’, foaf_knows => { foaf_name => "Alice" }, };
  • 7.
    Getting started Current specificationand issue tracker http://gbv.github.io/aREF/ Preliminary implementation in Perl: https://metacpan.org/release/Catmandu-RDF Feedback welcome!