{"id":51372,"date":"2016-01-26T10:10:10","date_gmt":"2016-01-26T08:10:10","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=51372"},"modified":"2016-01-26T10:10:10","modified_gmt":"2016-01-26T08:10:10","slug":"clojure-first-steps-reducers","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html","title":{"rendered":"Clojure: First steps with reducers"},"content":{"rendered":"<p>I\u2019ve been playing around with Clojure a bit today in preparation for <a href=\"https:\/\/skillsmatter.com\/meetups\/7794-using-clojure-neo4j-to-build-a-meetup-recommendation-engine\">a talk I\u2019m giving next week<\/a> and found myself writing the following code to apply the same function to three different scores:<\/p>\n<pre class=\" brush:java\">(defn log2 [n]\r\n  (\/ (Math\/log n) (Math\/log 2)))\r\n\u00a0\r\n(defn score-item [n]\r\n  (if (= n 0) 0 (log2 n)))\r\n\u00a0\r\n(+ (score-item 12) (score-item 13) (score-item 5)) 9.60733031374961<\/pre>\n<p>I\u2019d forgotten about folding over a collection but quickly remembered that I could achieve the same result with the following code:<\/p>\n<pre class=\" brush:java\">(reduce #(+ %1 (score-item %2)) 0 [12 13 5]) 9.60733031374961<\/pre>\n<p>The added advantage here is that if I want to add a 4th score to the mix all I need to do is append it to the end of the vector:<\/p>\n<pre class=\" brush:java\">(reduce #(+ %1 (score-item %2)) 0 [12 13 5 6]) 12.192292814470767<\/pre>\n<p>However, while Googling to remind myself of the order of the arguments to reduce I kept coming across <a href=\"http:\/\/clojure.org\/reference\/reducers\">articles and documentation about reducers<\/a> which I\u2019d heard about but never used.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>As I understand they\u2019re used to <a href=\"http:\/\/ianrumford.github.io\/blog\/2013\/08\/25\/some-trivial-examples-of-using-clojure-reducers\/\">achieve performance gains and easier composition of functions over collections<\/a> so I\u2019m not sure how useful they\u2019ll be to me but I thought I\u2019d give them a try.<\/p>\n<p>Our first step is to bring the namespace into scope:<\/p>\n<pre class=\"brush:java\">(require ' [ clojure.core.reducers :as r])<\/pre>\n<p>Now we can compute the same result using the <cite>reduce<\/cite> function:<\/p>\n<pre class=\" brush:java\">(r\/reduce #(+ %1 (score-item %2)) 0 [12 13 5 6]) 12.192292814470767<\/pre>\n<p>So far, so identical. If we wanted to calculate individual scores and then filter out those below a certain threshold the code would behave a little differently:<\/p>\n<pre class=\" brush:java\">(-&gt;&gt;[12 13 5 6]\r\n    (map score-item)\r\n    (filter #(&gt; % 3))) (3.5849625007211565 3.700439718141092)\r\n \r\n(-&gt;&gt; [12 13 5 6]\r\n     (r\/map score-item)\r\n     (r\/filter #(&gt; % 3))) #object [ clojure.core.reducers$folder$reify__19192 0x5d0edf21 \" clojure.core.reducers$folder$reify__19192@5d0edf21 \"]<\/pre>\n<p>Instead of giving us a vector of scores the reducers version returns a reducer which can pass into <cite>reduce<\/cite> or <cite>fold<\/cite> if we want an accumulated result or <cite>into<\/cite> if we want to output a collection. In this case we want the latter:<\/p>\n<pre class=\" brush:java\">(-&gt;&gt; [12 13 5 6]\r\n     (r\/map score-item)\r\n     (r\/filter #(&gt; % 3))\r\n     (into [])) (3.5849625007211565 3.700439718141092)<\/pre>\n<p>With a measly 4 item collection I don\u2019t think the reducers are going to provide much speed improvement here but we\u2019d need to use the <cite><a href=\"http:\/\/clojure.org\/reference\/reducers#_using_reducers\">fold<\/a><\/cite> function if we want processing of the collection to be done in parallel.<\/p>\n<p>One for next time!<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/www.markhneedham.com\/blog\/2016\/01\/24\/clojure-first-steps-with-reducers\/\">Clojure: First steps with reducers<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG partner<\/a> Mark Needham at the <a href=\"http:\/\/www.markhneedham.com\/blog\/\">Mark Needham Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the same function to three different scores: (defn log2 [n] (\/ (Math\/log n) (Math\/log 2))) \u00a0 (defn score-item [n] (if (= n 0) 0 (log2 n))) \u00a0 (+ &hellip;<\/p>\n","protected":false},"author":134,"featured_media":93,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-51372","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-clojure"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Clojure: First steps with reducers - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the\" \/>\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.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Clojure: First steps with reducers - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-26T08:10:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/clojure-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mark Needham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Needham\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html\"},\"author\":{\"name\":\"Mark Needham\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/fdb35381baa5059768d6788cfb685313\"},\"headline\":\"Clojure: First steps with reducers\",\"datePublished\":\"2016-01-26T08:10:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html\"},\"wordCount\":316,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/clojure-logo.jpg\",\"articleSection\":[\"Clojure\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html\",\"name\":\"Clojure: First steps with reducers - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/clojure-logo.jpg\",\"datePublished\":\"2016-01-26T08:10:10+00:00\",\"description\":\"I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/clojure-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/clojure-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/01\\\/clojure-first-steps-reducers.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JVM Languages\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/jvm-languages\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Clojure\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/jvm-languages\\\/clojure\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Clojure: First steps with reducers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/fdb35381baa5059768d6788cfb685313\",\"name\":\"Mark Needham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"caption\":\"Mark Needham\"},\"sameAs\":[\"http:\\\/\\\/www.markhneedham.com\\\/blog\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Mark-Needham\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Clojure: First steps with reducers - Java Code Geeks","description":"I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the","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.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html","og_locale":"en_US","og_type":"article","og_title":"Clojure: First steps with reducers - Java Code Geeks","og_description":"I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the","og_url":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-01-26T08:10:10+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/clojure-logo.jpg","type":"image\/jpeg"}],"author":"Mark Needham","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mark Needham","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html"},"author":{"name":"Mark Needham","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/fdb35381baa5059768d6788cfb685313"},"headline":"Clojure: First steps with reducers","datePublished":"2016-01-26T08:10:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html"},"wordCount":316,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/clojure-logo.jpg","articleSection":["Clojure"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html","url":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html","name":"Clojure: First steps with reducers - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/clojure-logo.jpg","datePublished":"2016-01-26T08:10:10+00:00","description":"I\u2019ve been playing around with Clojure a bit today in preparation for a talk I\u2019m giving next week and found myself writing the following code to apply the","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/clojure-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/clojure-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2016\/01\/clojure-first-steps-reducers.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JVM Languages","item":"https:\/\/www.javacodegeeks.com\/category\/jvm-languages"},{"@type":"ListItem","position":3,"name":"Clojure","item":"https:\/\/www.javacodegeeks.com\/category\/jvm-languages\/clojure"},{"@type":"ListItem","position":4,"name":"Clojure: First steps with reducers"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/fdb35381baa5059768d6788cfb685313","name":"Mark Needham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","caption":"Mark Needham"},"sameAs":["http:\/\/www.markhneedham.com\/blog\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Mark-Needham"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/51372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/134"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=51372"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/51372\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=51372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=51372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=51372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}