{"id":686,"date":"2004-12-07T21:05:08","date_gmt":"2004-12-07T21:05:08","guid":{"rendered":"http:\/\/beta.robertprice.co.uk\/robblog\/2004\/12\/parsing_rdf_in_perl_with_rdf_simple-shtml\/"},"modified":"2004-12-07T21:05:08","modified_gmt":"2004-12-07T21:05:08","slug":"parsing_rdf_in_perl_with_rdf_simple-shtml","status":"publish","type":"post","link":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/","title":{"rendered":"Parsing RDF In Perl With RDF::Simple"},"content":{"rendered":"<p>\nIn this article I&#8217;ll describe how to parse and extract data from an RDF file using <a href=\"http:\/\/www.zooleika.org.uk\/\">Jo Walsh<\/a>&#8216;s <a href=\"http:\/\/search.cpan.org\/~zooleika\/RDF-Simple-0.15\/lib\/RDF\/Simple\/Parser.pm\">RDF::Simple::Parser<\/a> module in <a href=\"http:\/\/www.perl.com\/\">Perl<\/a>.\n<\/p>\n<p>\nRDF::Simple::Parser does what it says on the tin, it provides a simple way to parse RDF. Unfortunately, that can make it hard to extract data. All it returns from a successful parse of the RDF file, is what Jo calls a &#8220;bucket-o-triples&#8221;. This is just an array of arrays. The first array contains an list of all the triples. The second array contains the actual triples broken down so Subject is in position 0, Predicate is in position 1 and Object in position 2.\n<\/p>\n<p>\nLet&#8217;s define these as constants in Perl as they&#8217;re not going to be changing.\n<\/p>\n<div class=\"code\"><code>use constant SUBJECT    =&gt; 0;<br \/>\nuse constant PREDICATE  =&gt; 1;<br \/>\nuse constant OBJECT     =&gt; 2;<br \/>\n<\/code><\/div>\n<p>\nI&#8217;m going to use my usual example of my parsing <a href=\"http:\/\/www.robertprice.co.uk\/foaf.rdf\">my <acronym title=\"Friend of a Friend\">FOAF<\/acronym> file<\/a>, and I&#8217;ll be extracting the addresses of my friend&#8217;s FOAF files from it. See the example in <a href=\"\/robblog\/archive\/2004\/10\/What_Is_An_RDF_Triple_.shtml\">What Is An RDF Triple<\/a>, for a full breakdown of this.\n<\/p>\n<p>\nWe&#8217;ll define the two predicates we need to look for as constants.<\/p>\n<div class=\"code\"><code>use constant KNOWS_PREDICATE =&gt; 'http:\/\/xmlns.com\/foaf\/0.1\/knows';<br \/>\nuse constant SEEALSO_PREDICATE =&gt; 'http:\/\/www.w3.org\/2000\/01\/rdf-schema#seeAlso';<br \/>\n<\/code><\/div>\n<\/p>\n<p>\nWe need to load in the FOAF file, so we&#8217;ll take advantage of File::Slurp&#8217;s read_file method to do this and put it in a variable called <var>$file<\/var>.<\/p>\n<div class=\"code\"><code>my $file = read_file('.\/foaf.rdf');<br \/>\n<\/code><\/div>\n<\/p>\n<p>\nBefore we can use RDF::Simple::Parser, we need to create an instance of it. I&#8217;ll set the base address to www.robertprice.co.uk in this case.<\/p>\n<div class=\"code\"><code>my $parser = RDF::Simple::Parser-&gt;new(base =&gt; 'http:\/\/www.robertprice.co.uk\/');<br \/>\n<\/code><\/div>\n<\/p>\n<p>\nNow we have the instance, we can pass in our FOAF file for parsing and get back our triples.<\/p>\n<div class=\"code\"><code>my @triples = $parser-&gt;parse_rdf($file);<br \/>\n<\/code><\/div>\n<\/p>\n<p>\nLet&#8217;s take a quick look at <a href=\"http:\/\/www.robertprice.co.uk\/foaf.rdf\">my <acronym title=\"Friend of a Friend\">FOAF<\/acronym> file<\/a> to get an example triple.\n<\/p>\n<p>\nI know <a href=\"http:\/\/www.iamcal.com\/\">Cal Henderson<\/a>, and this is represented in my <acronym title=\"Friend of a Friend\">FOAF<\/acronym> file as&#8230;\n<\/p>\n<div class=\"code\"><code>&lt;foaf:knows&gt;<br \/>\n&lt;foaf:Person&gt;<br \/>\n&lt;foaf:nick&gt;Cal&lt;\/foaf:nick&gt;<br \/>\n&lt;foaf:name&gt;Cal Henderson&lt;\/foaf:name&gt;<br \/>\n&lt;foaf:mbox_sha1sum&gt;2971b1c2fd1d4f0e8f99c167cd85d522a614b07b&lt;\/foaf:mbox_sha1sum&gt;<br \/>\n&lt;rdfs:seeAlso rdf:resource=\"http:\/\/www.iamcal.com\/foaf.xml\"\/&gt;<br \/>\n&lt;\/foaf:Person&gt;<br \/>\n&lt;\/foaf:knows&gt;<br \/>\n<\/code><\/div>\n<p>\nUsing the RDF validator we can get a the list of triples represented in this piece of RDF.\n<\/p>\n<table>\n<tr>\n<td>Triple<\/th>\n<th>Subject<\/th>\n<th>Predicate<\/th>\n<th>Object<\/th>\n<tr>\n<!-- START of validator triples --><\/p>\n<tr>\n<td>1<\/td>\n<td>genid:ARP40722<\/td>\n<td><a href='http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#type'>http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#type<\/a><\/td>\n<td><a href='http:\/\/xmlns.com\/foaf\/0.1\/Person'>http:\/\/xmlns.com\/foaf\/0.1\/Person<\/a><\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>genid:ARP40722<\/td>\n<td><a href='http:\/\/xmlns.com\/foaf\/0.1\/nick'>http:\/\/xmlns.com\/foaf\/0.1\/nick<\/a><\/td>\n<td>\n&quot;Cal&quot;\n<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>genid:ARP40722<\/td>\n<td><a href='http:\/\/xmlns.com\/foaf\/0.1\/name'>http:\/\/xmlns.com\/foaf\/0.1\/name<\/a><\/td>\n<td>\n&quot;Cal Henderson&quot;\n<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>genid:ARP40722<\/td>\n<td><a href='http:\/\/xmlns.com\/foaf\/0.1\/mbox_sha1sum'>http:\/\/xmlns.com\/foaf\/0.1\/mbox_sha1sum<\/a><\/td>\n<td>\n&quot;2971b1c2fd1d4f0e8f99c167cd85d522a614b07b&quot;\n<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>genid:ARP40722<\/td>\n<td><a href='http:\/\/www.w3.org\/2000\/01\/rdf-schema#seeAlso'>http:\/\/www.w3.org\/2000\/01\/rdf-schema#seeAlso<\/a><\/td>\n<td><a href='http:\/\/www.iamcal.com\/foaf.xml'>http:\/\/www.iamcal.com\/foaf.xml<\/a><\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>genid:me<\/td>\n<td><a href='http:\/\/xmlns.com\/foaf\/0.1\/knows'>http:\/\/xmlns.com\/foaf\/0.1\/knows<\/a><\/td>\n<td>genid:ARP40722<\/td>\n<\/tr>\n<p><!-- END of validator triples --><br \/>\n<\/table>\n<\/p>\n<p>\nThe part we are interested are triples 5 and 6. We can see that triple 6 has Predicate value the same as our <code>KNOWS_PREDICATE<\/code> constant, and triple 5 has the Predicate value of our <code>SEEALSO_PREDICATE<\/code> constant. The part this links the two is that triple 6 has the Object value of triple 5&#8217;s Subject.\n<\/p>\n<p>\nWe know if we search for triples with the same predicate as our <code>KNOWS_PREDICATE<\/code> we&#8217;ll get triples that are to do with people I know. We can use Perl&#8217;s <code>grep<\/code> function to get these triples, then we can interate over them in a <code>foreach<\/code> loop.\n<\/p>\n<div class=\"code\"><code>foreach my $known (grep { $_-&gt;[PREDICATE] eq KNOWS_PREDICATE } @triples) {<br \/>\n<\/code><\/div>\n<p>\nWe are only interest in the triples that have the same Subject as matching triple&#8217;s Object. Again, we can use <code>grep<\/code> to get these out so we can interate over them.\n<\/p>\n<div class=\"code\"><code>foreach my $triple (grep { $_-&gt;[SUBJECT] eq $known-&gt;[OBJECT] } @triples) {<br \/>\n<\/code><\/div>\n<p>\nNow we just need to make sure that the triple&#8217;s Predicate matches our <code>SEEALSO_PREDICATE<\/code> constant, and if it does, we can print out the value of it from it&#8217;s Object.\n<\/p>\n<div class=\"code\"><code>if ($triple-&gt;[PREDICATE] eq SEEALSO_PREDICATE) {<br \/>\nprint $triple-&gt;[OBJECT], \"n\"<br \/>\n}<br \/>\n<\/code><\/div>\n<p>\nLet&#8217;s put this all together into a working example&#8230;\n<\/p>\n<div class=\"code\"><code>#!\/usr\/bin\/perl -w<br \/>\nuse strict;<br \/>\nuse File::Slurp;<br \/>\nuse RDF::Simple::Parser;<br \/>\n## constants defining position of triple components in<br \/>\n## RDF::Simple triple lists.<br \/>\nuse constant SUBJECT    =&gt; 0;<br \/>\nuse constant PREDICATE  =&gt; 1;<br \/>\nuse constant OBJECT     =&gt; 2;<br \/>\n## some known predicates.<br \/>\nuse constant KNOWS_PREDICATE =&gt; 'http:\/\/xmlns.com\/foaf\/0.1\/knows';<br \/>\nuse constant SEEALSO_PREDICATE =&gt; 'http:\/\/www.w3.org\/2000\/01\/rdf-schema#seeAlso';<br \/>\n## read in my foaf file and put it in $file.<br \/>\nmy $file = read_file('.\/foaf.rdf');<br \/>\n## create a new parser, using my domain as a base.<br \/>\nmy $parser = RDF::Simple::Parser-&gt;new(base =&gt; 'http:\/\/www.robertprice.co.uk\/');<br \/>\n## parse my foaf file, and return a list of triples.<br \/>\nmy @triples = $parser-&gt;parse_rdf($file);<br \/>\n## iterate over a list of triples matching the KNOWN_PREDICATE value.<br \/>\nforeach my $known (grep { $_-&gt;[PREDICATE] eq KNOWS_PREDICATE } @triples) {<br \/>\n## iteratve over a list of triples that have the same subject<br \/>\n## as one of our KNOWN_PREDICATE triples object.<br \/>\nforeach my $triple (grep { $_-&gt;[SUBJECT] eq $known-&gt;[OBJECT] } @triples) {<br \/>\n## find triples that match the SEEALSO_PREDICATE<br \/>\nif ($triple-&gt;[PREDICATE] eq SEEALSO_PREDICATE) {<br \/>\n## print out the object, should be the address<br \/>\n## of my friends foaf file.<br \/>\nprint $triple-&gt;[OBJECT], \"n\"<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n<\/code><\/div>\n<p>\nThe example will load in the FOAF file, parse it and print out any friends of mine that have FOAF files defined by the seeAlso predicate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article I&#8217;ll describe how to parse and extract data from an RDF file using Jo Walsh&#8216;s RDF::Simple::Parser module in Perl. RDF::Simple::Parser does what it says on the tin, it provides a simple way to parse RDF. Unfortunately, that can make it hard to extract data. All it returns from a successful parse of &hellip; <a href=\"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Parsing RDF In Perl With RDF::Simple&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[2],"tags":[21,47,56],"class_list":["post-686","post","type-post","status-publish","format-standard","hentry","category-dev","tag-foaf","tag-perl","tag-rdf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Parsing RDF In Perl With RDF::Simple - Robert Price<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Parsing RDF In Perl With RDF::Simple - Robert Price\" \/>\n<meta property=\"og:description\" content=\"In this article I&#8217;ll describe how to parse and extract data from an RDF file using Jo Walsh&#8216;s RDF::Simple::Parser module in Perl. RDF::Simple::Parser does what it says on the tin, it provides a simple way to parse RDF. Unfortunately, that can make it hard to extract data. All it returns from a successful parse of &hellip; Continue reading &quot;Parsing RDF In Perl With RDF::Simple&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/\" \/>\n<meta property=\"og:site_name\" content=\"Robert Price\" \/>\n<meta property=\"article:published_time\" content=\"2004-12-07T21:05:08+00:00\" \/>\n<meta name=\"author\" content=\"rob\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rob\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/\"},\"author\":{\"name\":\"rob\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\"},\"headline\":\"Parsing RDF In Perl With RDF::Simple\",\"datePublished\":\"2004-12-07T21:05:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/\"},\"wordCount\":588,\"keywords\":[\"FOAF\",\"Perl\",\"RDF\"],\"articleSection\":[\"Dev\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/\",\"name\":\"Parsing RDF In Perl With RDF::Simple - Robert Price\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#website\"},\"datePublished\":\"2004-12-07T21:05:08+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/parsing_rdf_in_perl_with_rdf_simple-shtml\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Parsing RDF In Perl With RDF::Simple\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#website\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/\",\"name\":\"Robert Price\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\",\"name\":\"rob\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"caption\":\"rob\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Parsing RDF In Perl With RDF::Simple - Robert Price","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/","og_locale":"en_GB","og_type":"article","og_title":"Parsing RDF In Perl With RDF::Simple - Robert Price","og_description":"In this article I&#8217;ll describe how to parse and extract data from an RDF file using Jo Walsh&#8216;s RDF::Simple::Parser module in Perl. RDF::Simple::Parser does what it says on the tin, it provides a simple way to parse RDF. Unfortunately, that can make it hard to extract data. All it returns from a successful parse of &hellip; Continue reading \"Parsing RDF In Perl With RDF::Simple\"","og_url":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/","og_site_name":"Robert Price","article_published_time":"2004-12-07T21:05:08+00:00","author":"rob","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rob","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/#article","isPartOf":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/"},"author":{"name":"rob","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5"},"headline":"Parsing RDF In Perl With RDF::Simple","datePublished":"2004-12-07T21:05:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/"},"wordCount":588,"keywords":["FOAF","Perl","RDF"],"articleSection":["Dev"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/","url":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/","name":"Parsing RDF In Perl With RDF::Simple - Robert Price","isPartOf":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/#website"},"datePublished":"2004-12-07T21:05:08+00:00","author":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5"},"breadcrumb":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.robertprice.co.uk\/robblog\/parsing_rdf_in_perl_with_rdf_simple-shtml\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.robertprice.co.uk\/robblog\/"},{"@type":"ListItem","position":2,"name":"Parsing RDF In Perl With RDF::Simple"}]},{"@type":"WebSite","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#website","url":"https:\/\/www.robertprice.co.uk\/robblog\/","name":"Robert Price","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.robertprice.co.uk\/robblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5","name":"rob","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","caption":"rob"}}]}},"_links":{"self":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/comments?post=686"}],"version-history":[{"count":0,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/686\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/media?parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/categories?post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/tags?post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}