{"id":213,"date":"2022-06-12T15:18:18","date_gmt":"2022-06-12T15:18:18","guid":{"rendered":"https:\/\/kindsonthegenius.com\/elm\/?p=213"},"modified":"2022-06-12T15:18:18","modified_gmt":"2022-06-12T15:18:18","slug":"working-with-json-decoders","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/","title":{"rendered":"Working With JSON Decoders"},"content":{"rendered":"<p>In this tutorial, you will learn about JSON encoders and decoders. We would start with JSON Decoders.<\/p>\n<p>We would cover the following:<\/p>\n<ol>\n<li><a href=\"#t1\">Understanding JSON Decoders<\/a><\/li>\n<li><a href=\"#t2\">Building Decoders<\/a><\/li>\n<li><a href=\"#t3\">Combining Decoders<\/a><\/li>\n<li><a href=\"#t4\">Nesting Decoders<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. JSON Decoders<\/strong><\/h4>\n<p>First we need to understand what JSON decoding means. If we have some JSON structure, for example:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">{\r\n    <span style=\"color: #007700;\">\"firstname\"<\/span> : <span style=\"background-color: #fff0f0;\">\"Kindson\"<\/span>,\r\n    <span style=\"color: #007700;\">\"lastname\"<\/span> : <span style=\"background-color: #fff0f0;\">\"Munonye\"<\/span>,\r\n    <span style=\"color: #007700;\">\"age\"<\/span> : <span style=\"color: #0000dd; font-weight: bold;\">40<\/span>\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>For this structure to be useful in an Elm code, we need to extract the values from this JSON object. Why? Since Elm is a pure functional language, we cannot just pass in a raw JSON structure as it may lead to undesirable side effect. So we need not process the JSON structure and extract the values into Elm data types.<\/p>\n<p>For the example above, we would need two decoders:<\/p>\n<ul>\n<li><strong>Decoder String<\/strong> &#8211; to extract the String values<\/li>\n<li><strong>Decoder Int<\/strong> &#8211; to extract the Int values<\/li>\n<\/ul>\n<p>These two decoders are given in the next section.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Building Decoders<\/strong><\/h4>\n<p>So how do we build these decoders?<\/p>\n<p>Elm provides little decoders for decoding different data types. These decoders are available in the <em>Json.Decode<\/em> module.\u00a0 To use this module you need to install the elm\/json library using elm install.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #0066bb; font-weight: bold;\">firstnameDecoder<\/span> <span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Decoder<\/span> <span style=\"color: #333399; font-weight: bold;\">String<\/span>\r\n<span style=\"color: #0066bb; font-weight: bold;\">firstnameDecoder<\/span> <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    field <span style=\"background-color: #fff0f0;\">\"firstname\"<\/span> string\r\n\r\n<span style=\"color: #0066bb; font-weight: bold;\">lastnameDecoder<\/span> <span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Decoder<\/span> <span style=\"color: #333399; font-weight: bold;\">String<\/span>\r\n<span style=\"color: #0066bb; font-weight: bold;\">lastnameDecoder<\/span> <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    field <span style=\"background-color: #fff0f0;\">\"lastname\"<\/span> string\r\n   \r\n<span style=\"color: #0066bb; font-weight: bold;\">ageDecoder<\/span> <span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Decoder<\/span> <span style=\"color: #333399; font-weight: bold;\">Int<\/span>\r\n<span style=\"color: #0066bb; font-weight: bold;\">ageDecoder<\/span>  <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    field <span style=\"background-color: #fff0f0;\">\"age\"<\/span> int\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>So you can see that we can build decoders for various data types. What if we have a custom data type? Let&#8217;s see that in the next section.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Combining Decoders<\/strong><\/h4>\n<p>Assuming we have a custom type Student that has two fields as shown below:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">type<\/span> alias <span style=\"color: #333399; font-weight: bold;\">Student<\/span> <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    { name<span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">String<\/span>\r\n    , age <span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Int<\/span>\r\n    }\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>We would like build a decoder that takes a json string\u00a0 and returns a Student object. To this we need to combine two decoders using the <em>map2<\/em> function. This function person object, and the two fields to be decoded. The resulting combined decoder is given below:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #0066bb; font-weight: bold;\">studentDecoder<\/span> <span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Decoder<\/span> <span style=\"color: #333399; font-weight: bold;\">Student<\/span>\r\n<span style=\"color: #0066bb; font-weight: bold;\">studentDecoder<\/span> <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    map2 <span style=\"color: #333399; font-weight: bold;\">Student<\/span>\r\n    (<span style=\"color: #333399; font-weight: bold;\">Decode<\/span><span style=\"color: #333333;\">.<\/span>field <span style=\"background-color: #fff0f0;\">\"name\"<\/span> string)\r\n    (<span style=\"color: #333399; font-weight: bold;\">Decode<\/span><span style=\"color: #333333;\">.<\/span>field <span style=\"background-color: #fff0f0;\">\"age\"<\/span> int)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>So if we use the studentDecoder on<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">{ <span style=\"color: #007700;\">\"name\"<\/span>: <span style=\"background-color: #fff0f0;\">\"Kindson\"<\/span>, <span style=\"color: #007700;\">\"age\"<\/span>: <span style=\"color: #0000dd; font-weight: bold;\">40<\/span> }\r\n<\/pre>\n<p>We would have a Student object<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. Nesting Decoder<\/strong><\/h4>\n<p>Sometimes, we may have JSON objects that have nested objects.\u00a0 In this case, we need to think about decoders for both the parent structure and the nested structure. For example, the json below is structure with a nested object.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">{\r\n  <span style=\"color: #007700;\">\"subject\"<\/span>: <span style=\"background-color: #fff0f0;\">\"Literature in English\"<\/span>,\r\n  <span style=\"color: #007700;\">\"department\"<\/span>: <span style=\"background-color: #fff0f0;\">\"Language Studies\"<\/span>,\r\n  <span style=\"color: #007700;\">\"student\"<\/span>:\r\n  {\r\n    <span style=\"color: #007700;\">\"name\"<\/span>: <span style=\"background-color: #fff0f0;\">\"Kindson Munonye\"<\/span>,\r\n    <span style=\"color: #007700;\">\"age\"<\/span>: <span style=\"color: #0000dd; font-weight: bold;\">40<\/span>,\r\n    <span style=\"color: #007700;\">\"location\"<\/span>: <span style=\"background-color: #fff0f0;\">\"Budapest\"<\/span>\r\n  },\r\n  <span style=\"color: #007700;\">\"year\"<\/span>: <span style=\"color: #0000dd; font-weight: bold;\">54<\/span>\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>This structure represents an exam that a student enrols in. The equivalent Elm object is the record below:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">type<\/span> alias <span style=\"color: #333399; font-weight: bold;\">Exam<\/span> <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    { subject<span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">String<\/span>\r\n    , department<span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">String<\/span>\r\n    , student<span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Student<\/span>\r\n    , year<span style=\"color: #333399; font-weight: bold;\">:<\/span> <span style=\"color: #333399; font-weight: bold;\">Int<\/span>\r\n    }\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>The encoder for this would then use the studentEncoder we built earlier on like this:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #0066bb; font-weight: bold;\">examDecoder<\/span> <span style=\"color: #000000; font-weight: bold;\">=<\/span>\r\n    map4 <span style=\"color: #333399; font-weight: bold;\">Exam<\/span>\r\n    (<span style=\"color: #333399; font-weight: bold;\">Decode<\/span><span style=\"color: #333333;\">.<\/span>field <span style=\"background-color: #fff0f0;\">\"subject\"<\/span> string)\r\n    (<span style=\"color: #333399; font-weight: bold;\">Decode<\/span><span style=\"color: #333333;\">.<\/span>field <span style=\"background-color: #fff0f0;\">\"department\"<\/span> string)\r\n    (<span style=\"color: #333399; font-weight: bold;\">Decode<\/span><span style=\"color: #333333;\">.<\/span>field <span style=\"background-color: #fff0f0;\">\"student\"<\/span> studentDecoder)\r\n    (<span style=\"color: #333399; font-weight: bold;\">Decode<\/span><span style=\"color: #333333;\">.<\/span>field <span style=\"background-color: #fff0f0;\">\"age\"<\/span> int)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn about JSON encoders and decoders. We would start with JSON Decoders. We would cover the following: Understanding JSON Decoders &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[2],"tags":[34,33],"class_list":["post-213","post","type-post","status-publish","format-standard","hentry","category-elm-programming-tutorial","tag-decoders","tag-json-decoders"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Working With JSON Decoders - Elm Programming<\/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:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working With JSON Decoders - Elm Programming\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn about JSON encoders and decoders. We would start with JSON Decoders. We would cover the following: Understanding JSON Decoders &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/\" \/>\n<meta property=\"og:site_name\" content=\"Elm Programming\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-12T15:18:18+00:00\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\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:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/#\\\/schema\\\/person\\\/2a5153913a1c6885206701c60aef361e\"},\"headline\":\"Working With JSON Decoders\",\"datePublished\":\"2022-06-12T15:18:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/\"},\"wordCount\":379,\"commentCount\":0,\"keywords\":[\"Decoders\",\"JSON Decoders\"],\"articleSection\":[\"Elm Programming Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/\",\"name\":\"Working With JSON Decoders - Elm Programming\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/#website\"},\"datePublished\":\"2022-06-12T15:18:18+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/#\\\/schema\\\/person\\\/2a5153913a1c6885206701c60aef361e\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/working-with-json-decoders\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working With JSON Decoders\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/#website\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/\",\"name\":\"Elm Programming\",\"description\":\"Elm Programming Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/#\\\/schema\\\/person\\\/2a5153913a1c6885206701c60aef361e\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"sameAs\":[\"https:\\\/\\\/kindsonthegenius.com\\\/elm\"],\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/elm\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Working With JSON Decoders - Elm Programming","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:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/","og_locale":"en_US","og_type":"article","og_title":"Working With JSON Decoders - Elm Programming","og_description":"In this tutorial, you will learn about JSON encoders and decoders. We would start with JSON Decoders. We would cover the following: Understanding JSON Decoders &hellip;","og_url":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/","og_site_name":"Elm Programming","article_published_time":"2022-06-12T15:18:18+00:00","author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/#article","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/kindsonthegenius.com\/elm\/#\/schema\/person\/2a5153913a1c6885206701c60aef361e"},"headline":"Working With JSON Decoders","datePublished":"2022-06-12T15:18:18+00:00","mainEntityOfPage":{"@id":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/"},"wordCount":379,"commentCount":0,"keywords":["Decoders","JSON Decoders"],"articleSection":["Elm Programming Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/","url":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/","name":"Working With JSON Decoders - Elm Programming","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/elm\/#website"},"datePublished":"2022-06-12T15:18:18+00:00","author":{"@id":"https:\/\/kindsonthegenius.com\/elm\/#\/schema\/person\/2a5153913a1c6885206701c60aef361e"},"breadcrumb":{"@id":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kindsonthegenius.com\/elm\/working-with-json-decoders\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kindsonthegenius.com\/elm\/"},{"@type":"ListItem","position":2,"name":"Working With JSON Decoders"}]},{"@type":"WebSite","@id":"https:\/\/kindsonthegenius.com\/elm\/#website","url":"https:\/\/kindsonthegenius.com\/elm\/","name":"Elm Programming","description":"Elm Programming Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kindsonthegenius.com\/elm\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kindsonthegenius.com\/elm\/#\/schema\/person\/2a5153913a1c6885206701c60aef361e","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"sameAs":["https:\/\/kindsonthegenius.com\/elm"],"url":"https:\/\/kindsonthegenius.com\/elm\/author\/kindsonthegenius-3\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/posts\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":2,"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":215,"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/posts\/213\/revisions\/215"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/elm\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}