Overview# To verify that IIIF manifests are written in JSON-LD, I tried converting them to other formats, so this is a memo of that process.
We hope this serves as a useful reference for understanding the relationship between RDF and file formats such as JSON-LD and Turtle, as well as their relationship with IIIF manifest files described in JSON-LD.
Target# For this exercise, we will use the following manifest file published on the NDL Digital Collection.
https://dl.ndl.go.jp/api/iiif/3437686/manifest.json
Conversion# We use the EASY RDF Converter.
https://www.easyrdf.org/converter
As shown below, specify the IIIF manifest file URL, select JSON-LD as the Input Format, and Turtle as the Output Format.
The result was converted as follows.
@ @ @ @ @ @ @ @ @ @ @ < < < < < p p p p p p p p p p p h ) ) h h h h r r r r r r r r r r r t a n n n n d r r f t a n r t a n r e e t a n r t a n r e e e e e e e e e e e e e t s s < < < < < < < < < < < < < < < < ; s s _ _ _ _ _ _ _ _ _ _ _ ; c d d o t s d t s d x x t s d t s d x x f f f f f f f f f f f p < 0 0 h h h h h h h h h h h h h h h h 0 0 : : : : : : : : : : : : f f a p n 0 f p n 0 f i i p n 0 f p n 0 f i i i i i i i i i i i i i s h : : t t t t t t t t t t t t t t t t : : g g g g g g g g g g g r s s f s s : s s s : s f f s s : s s s : s f f x x x x x x x x x x x : t a h t t t t t t t t t t t t t t t t h m e e e e e e e e e e e i : : : : 0 h : : 0 h : : : : 0 h : : 0 h : : : / t t a p p p p p p p p p p p p p p p p a e n n n n n n n n n n n g l s l / : a l / : a l h w / : a l / : a l h w n x d r f e d n d o r / p t s s s s s s s s s s s s s s s s s s t i i i i i i i i i i i h a e o / R s a / C s a e i / R s a / C s a e i s s c d o x c s o a d d : r R : : : : : : : : : : : : : : : : S a d d d d d d d d d d d t b e g d a C b d a I b i d d a C b d a I b i d 0 d : f a i 1 1 a : f l i a / e d 2 2 2 2 2 3 3 3 3 3 4 s e A o l n a e l n m e g t l n a e l n m e g t : : s f f 1 : p : . / b n / q a 0 2 4 6 8 0 2 4 6 8 0 l l . g n l . v a l h h . g n l . v a l h h < : : : : : < n i u g d d d d d d d d d d d d d d d d u t < s < n e v n a g t n e v n a g t < < h < h < d i t e l l l l l l l l l l l l l l l l e a h " o h d a " d s e " 6 d a " d s e " 6 h h t < < < < h < t h l i i s . . . . . . . . . . . . . . . . n L t 校 t l ; s 校 l A 3 4 8 l ; s 目 l A 1 4 8 t t t h h h h t h t t . f o n n n n n n n n n n n n n n n n c a t 異 < t . e 異 . ; n " 7 9 . e 次 . ; n 9 7 9 t t p t t t t t t p t g . n ( d d d d d d d d d d d d d d d d e b p 源 h p g s 源 g n ^ 0 0 g s " g n " 0 0 p p : t t t t p t : p o i L l l l l l l l l l l l l l l l l s e s 氏 t s o 氏 o o ^ 6 o ^ o o ^ 6 : : p p p p : p / : . o a . . . . . . . . . . . . . . . . l : 物 t : . ( 物 . t x . . ( ^ . t ^ . / : : : : : / j / b g g g g g g g g g g g g g g g g ( s / 語 p / j 語 j a s ; j x j a x ; p / w / p a e o o o o o o o o o o o o o o o o / . s / p < p t d p < s p t s i w u r / w w / p l . . . . . . . . . . . . . . . . _ ( d : d / h 卷 / i : / h d / i d i w r w x w p d u w w a i j j j j j j j j j j j j j j j j : l 巻 / l a t 一 a o s a t : a o : i w l w m w u f s . w p / " p p p p p p p p p p p p p p p p g . 一 / . p t " p n t p t s p n s f . . w l w r s e w . i p 国 / / / / / / / / / / / / / / / / e n " d n i p ^ i s r i p t i s t . w o . n . l . f 3 w / r 立 a a a a a a a a a a a a a a a a n d ^ l d / s ^ / i / s r / r i 3 r w s w . o u . 3 i e 国 p p p p p p p p p p p p p p p p i l ^ . l i : x i ( n i : i i ( i o . g 3 . 3 o r l o . i s 会 i i i i i i i i i i i i i i i i d . x n . i / s i g i / n i n o / . c . r g i r o i e 図 / / / / / / / / / / / / / / / / 1 g s d g i / d i _ i / g i _ g a r d o o o g n g r f n 書 i i i i i i i i i i i i i i i i 8 o d l o f d : f : ; f d f : p g c r m r s c g / t 館 i i i i i i i i i i i i i i i i . : . . / l s / g / l . / g ; i / g g d i . n / 3 a i i i i i i i i i i i i i i i i ) j s g j 3 . t 3 e 3 . 3 e 2 t f c c s 1 4 t N f f f f f f f f f f f f f f f f p t o p 4 n r 4 n 4 n 4 n p 0 e 2 2 c / 9 3 i a / / / / / / / / / / / / / / / / ; / r . / 3 d i 3 i 3 d 3 i r 0 r 0 a 0 e m 9 7 o t 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 j i j i 7 l n 7 d 7 l 7 d e 1 m 0 f 0 l s a 9 6 n i 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 a n p m 6 . g 6 4 6 . 6 4 s / s 0 3 e e n # / 8 / o 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 / g / g 8 g 8 3 8 g 8 6 e X / 0 m r s > 0 6 2 n 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 i a / 6 o . 6 6 o 6 n M > 0 . 1 e v / 2 / # a 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 i ; p l / . / ) / . / ) t L 1 1 2 n i d / m M l 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 i i r j c r j c a S / / / t c o 2 a a 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 f g a p a ; a p a ; t c r > e s e a 2 n n D / / / / / / / / / / / / / / / / _ o o n / n n / n i h d x / s p - i i i r r r r r r r r r r r r r r r r l a / g a v g a v o e f i 1 # # r f f e a a a a a a a a a a a a a a a a i i n e p a e p a n m - f . > > d e e t n n n n n n n n n n n n n n n n c p d / i s / i s / a s 1 f s s g g g g g g g g g g g g g g g g e m l 1 / / 2 / / 2 # c n / - t t L e e e e e e e e e e e e e e e e n h d > i 3 > i 1 # > h s > s . > i / / / / / / / / / / / / / / / / s ? c i > i 9 > e # y j b 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 e v / i i > m > n s ; r > > > > > > > > > 0 1 2 3 4 5 6 . e i f f a t o a > > > > > > > h r i / / # a n r t b i 3 3 > x > y m = f 4 4 - , l G - 3 3 n > e l 7 7 s J t o 6 6 # A ; R g 8 8 > P e o 6 6 A c . / / N o p c c " r n a a ^ d g n n ^ & > v v x m a a s e s s d t / / : a 3 1 s d > 9 t a > r t ) i a ) n P ; g r ; e ; f i x = d c n d l _ p o r t a & i d e n t i f i e r = o a i : d l . n d l . g o . j p : i n f o : n d l j p / p i d / 3 4 3 7 6 8 6 > ; Let’s also convert to RDF/XML.
< < ? r x d < m f r l : d < < < R f r n n v D : d s s < e F D f 0 0 r r e : : : d < s x x x x x x x x x x s t a h f r / i m m m m m m m m m m c y t a : d < r o l l l l l l l l l l r p t s D f n / d n n n n n n n n n n n i e r R e : s < < n f = s s s s s s s s s s p i a s f 0 n / r s : " : : : : : : : : : : t r b n c i : s < n d 0 f 1 r n r f d d o n d e i d u g r r R 0 r / s f : i . d s d o c c a s o x o f t e i s a : d < < r 0 s R r 0 f 0 f a 1 = = 1 a i n : i s p t n h f r r d : : a s " = = s f 1 " " = p f r o > t > g a : d d f h l n t " " = = = h h " = = r e n i e s D f f : a a g > e h h " " " t t h " " d s L o C e : : D s b e n t t h h h t t t h h f o a n r a s f r e C e > c t t t t t p p t t t : u b > d n c i e s a l o p p t t t : : p t t a r e f v r r s c n d : : p p p / : p p b c l : a i s t r v r i / : : : / / : : o e a s p t i a d n / / p w / / u = r b e t r p s f g w i / u w r / t " d o s i r d t e : = w i w x p r w d u w = h f u > o d f i s d " w i w m u l . f s w " t : t n f : o > a u . f w l r . w s e w h t d = > : r n t t w . . n l o 3 . f . t p a " r e > a f 3 i w s . r . o u w t : t h e s t - . o 3 . o g r l 3 p / a t s o y 8 o / . c r r g i . s / t t o u p " r a o o g d g n o : i y p u r e g p r m c s c r / i p s r c = ? / i g d n i . g / i e : c e " > 1 / f c t s c d f = / e = h 9 p 2 o / e c 2 l . " / = " t 9 r 0 a e r o m 0 . i h d " h t 9 e 0 f l m a s / 0 n o t l h t p / s 0 e s # e n 3 d / t . t t : 0 e 0 m / " r s l a p n t p / 2 n 0 . e " v 1 . p : d p : / / t 1 1 n i d 2 g i l s / w 2 a / / t c o / o / . : w 2 t r " s e a e . p w g w w - i d / s p x j r w o / w . r o f 1 # # i p e w . d w w d n - . " " f / s . j l . 3 f / s 1 / a e w p . w . - 2 c / n p n 3 / n 3 o s # h " s i t . a d . r y " e # / a o p l o g n m " i t r i . r / t a > i i g / g g 2 a # i o / i o 0 x " f n 2 i . 1 0 - / / 0 i j 9 1 n 3 2 0 f p 9 / s 4 # 1 / / 9 X # 3 M / 3 a / M " 7 a X 4 p 0 L 6 n M 3 i 2 S 8 i L 7 / / c 6 f S 6 i 2 h / e c 8 i 2 e m s h 6 i - m a t e / f r a n " m r / d # i / a a 3 f s f > # n 4 - t e s g 3 s r s t e 7 y i t r / 6 n n . i 1 8 t g j n " 6 a " s g > / x > o " c - 校 n > a n 異 " 国 n s 源 > 立 v # 氏 国 a n 物 会 s i 語 図 / l 書 3 " 卷 館 " 一 < N / a r t d i f o s n : a l l a b D e i l e > t L i b r a r y , J A P A N < / n s 0 : a t t r i b u t i o n L a b e l > Since JSON-LD is one of the output formats for RDF data, we can see that conversion to other formats can be performed mechanically.
@context in IIIF Manifests# JSON-LD files typically have an @context property. In the case of the IIIF manifest file being examined, it is described as follows.
{ " " " " " " } @ @ @ l m l c t i a e i o y d b t c n p " e a e t e : l d n e " " a s x : " : t e t h a " " " t " " : : s t 校 : c p 異 " " : s 源 [ h h M : 氏 ] t t a / 物 , t t n / 語 p p i d . s : f l : / e . 巻 / / s n 一 / i t d " d i " l , l i , . . f g n . o d i . l o j . / p g a / o p a . i p j / i p p / / r i j e i a s i / e f i n / i t 3 i a 4 f t 3 _ i 7 l o 6 i n 8 c / 6 e 2 / n / m s c a e o n . n i h t f t e e m x s l t t " . . , j j s s o o n n " " , ,
Let’s examine the contents of the URL specified in the @context property.
http://iiif.io/api/presentation/2/context.json
The following JSON is displayed, where for example, the license property has @type as @id and @id as dcterms:rights.
{ } " @ c o n { t e x t " " " " } " s d a l , : c c s i " t " c [ : e : e " " r n @ @ " m " s t i h s h e y d t " t " p " t : t : e : p p " : " : { : " / h / d / t / " c i t w @ t i p w i e i : w d r f / . " m . / w , s i p 3 : o u . r / r o i a l r g p . g h i o / t / r n s p g s " r / / e d a s c c e / t n t i t e v a r i t m t i s y o / s n " t / , r 2 e # a " m , s # " ,
This means that the description "license": "https://dl.ndl.go.jp/ja/iiif_license.html" in the IIIF manifest file indicates that the property is dcterms:rights, and the value https://dl.ndl.go.jp/ja/iiif_license.html should be treated as a resource.
Looking at the earlier Turtle output, we can confirm that it was converted accordingly.
@ < p h r t a n d e t s c f p < 0 : i s h : r x : t a i / t t g d / p t h c d : r t : l i s . / b < n i u < h d i t h t l i i t t . f o t p g . n p : o i L s / . o a : / j / b / p p a e / u / p l d r a i l l p / " . . i p 国 n o / r 立 d r i e 国 l g i s 会 . / i e 図 g d f n 書 o c / t 館 . / 3 a j t 4 t N p e 3 i a / r 7 o t j m 6 n i a s 8 / o / / 6 2 n i > / # a i m M l i a a f n n D _ i i i l f f e i e e t c s s e t t L n . > i s j b e s ; r . o a h n r t > y m , l > J A ; P A N " ^ ^ x s d : s t r i n g ; Note that the prefix dc in the output refers to http://purl.org/dc/terms/, which matches the definition in the IIIF manifest’s @context. This confirms that the conversion to Turtle format was performed correctly.
Summary# We hope this serves as a useful reference for understanding the relationship between RDF and file formats such as JSON-LD and Turtle, as well as their relationship with IIIF manifest files described in JSON-LD.