About Thing 3
Purpose: Resource Description Framework (RDF) is the way Linked Data assertions are put together; serializations are the way they are expressed or written down. This Thing explores what serializations are, how they are used in RDF, and a few commonly used examples.
Learning Outcomes: Be familiar with two or more RDF Syntaxes. Participants will be able to put statements into serialization formats and interpret information already in those formats.
Intended Audience: Intermediate
Prerequisites: Thing 2. RDF and URIs
Author: Lizzy Baus, Macalester College
Expected Duration: 30-45 minutes
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Getting Started
Once some information has been modeled using the Resource Description Framework (RDF), it needs to be expressed in a particular way so that it can be shared and used by applications or on the web. We call this form of expression a serialization, also known as a syntax. There are many different serialization formats available, each with their own pros and cons.
Often a specific syntax will be developed by a specific community - for instance, the JSON-LD serialization is based on models used by web developers who might not be familiar with RDF to begin with. Similarly, RDF/XML uses structures familiar to anyone who has been exposed to XML, or to some extent HTML as well. Each syntax or serialization emphasizes the needs of the group that creates it, just as different measurement systems or metadata standards work for different groups and purposes. There may also be common practices of a certain community that are reflected in a serialization (e.g. always starting a document by naming its context, or using certain punctuation to open or close a statement). In this Thing, you will learn how to identify and read a few of the more common formats.
Activities
Read through this list of RDF syntaxes (serializations). The table near the bottom of the W3C page shows some of the most commonly used serializations.
- Note how the main list is organized by the base markup language or tool.
- Choose two syntaxes and click on their linked names to learn more about them. In the library Linked Data world you will most often encounter RDF/XML, JSON-LD, or Turtle, but you may look at any syntax you like for this exercise.
Take this example sentence: Toni Morrison is the author of The Bluest Eye. Remember that in Thing 2 we split it up into three pieces:
- Subject | what the triple is about | Toni Morrison
- Predicate | what the relationship is (like a verb) | is the author of
- Object | the other half of the relationship | The Bluest Eye
Using this example, practice expressing this bit of RDF in each of the two syntaxes you chose.
Reflection
How does a chosen syntax change how RDF is expressed? What are some differences between the two syntaxes you chose to explore? What pieces of information are more prominent than others? Consider sharing your reflection responses in the Comments section at the bottom of the page.
Additional Resources
- “RDF 1.1 XML Syntax.” W3C Recommendations. 25 February 2014, https://www.w3.org/TR/rdf-syntax-grammar/
- JSON for Linking Data. https://json-ld.org/. Accessed 15 July 2022.
- “RDF 1.1 Turtle: Terse RDF Triple Language.” W3C Recommendations. 25 February 2014, https://www.w3.org/TR/turtle/
Claim Credit
Need a certificate of completion? Answer the questions below, submit them, and you’ll receive an email confirmation with a link to download your certificate.
I choose to look at Turtle and JSON-LD. Turtle seemed simpler to grasp pretty quickly while JSON-LD seemed a little more complicated (more coding like) but also more flexible and extensible. The other really obvious difference is the terminology used to describe the same type of thing or action.
In JSON-LD it seemed easier to visually pick out the triples/data being graphed compared to Turtle.
How does a chosen syntax change how RDF is expressed? What are some differences between the two syntaxes you chose to explore? What pieces of information are more prominent than others?