{"id":313,"date":"2021-01-20T03:00:15","date_gmt":"2021-01-20T03:00:15","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=313"},"modified":"2021-01-20T03:22:46","modified_gmt":"2021-01-20T03:22:46","slug":"javascript-working-with-classes","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/","title":{"rendered":"Javascript: Working With Classes"},"content":{"rendered":"\n<p>Introduced in <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\" target=\"_blank\" rel=\"noreferrer noopener\">ES6<\/a> as a major update to the <a href=\"https:\/\/codeflarelimited.com\/blog\/2020\/11\/05\/object-oriented-programming\/\" target=\"_blank\" rel=\"noreferrer noopener\">Object Oriented Programming <\/a>concept in Javascript, Classes are templates for creating objects.<\/p>\n\n\n\n<p>Classes can also referred to as the &#8220;syntactic sugar&#8221; of constructor functions. This means that they are an alternative way of writing constructor functions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Working With a Class<\/h3>\n\n\n\n<p>One way to define a class is to use the class declaration. To declare a class, you use the &#8220;class&#8221; keyword followed by the name of the class.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Rectangle{\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using constructor Method<\/h3>\n\n\n\n<p>A constructor method is a special method created within a declared class.  <\/p>\n\n\n\n<p>Constructor methods are used to initialize object properties created within that class.<\/p>\n\n\n\n<p>There can only be one special method with the name &#8220;constructor&#8221; within a class. A syntaxError will be thrown if a class contains more than one instance of a constructor method.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Rectangle{\nconstructor(width, height){\nthis.width = width;\nthis.height = height;\n}\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Class Methods<\/h3>\n\n\n\n<p>class methods can be referred to as a special method within your declared class.<\/p>\n\n\n\n<p> This special class manipulates, interacts with or showcase the object properties created with the constructor method.<\/p>\n\n\n\n<p>For instance, after declaring the properties &#8220;width&#8221; and &#8220;height&#8221; of the <em><strong>Rectangle<\/strong><\/em> class, it is possible that we also want to interact with these declared properties and perform some kind of calculation with them.<\/p>\n\n\n\n<p>Also, after creating this special method that performs the calculation, we might also want to create another method that calls this method so that the result can be seen when it is called through the class instance.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Rectangle{\nconstructor(width, height){\nthis.width = width;\nthis.height = height;\n}\n\n\/\/Method\ncalcArea(){\nreturn this.width * this.height;\n}\n\n\/\/Getter\ngetArea(){\nreturn this.calcArea();\n}\n}<\/code><\/pre>\n\n\n\n<p>Just writing the code like this and running it won&#8217;t give any result. <\/p>\n\n\n\n<p>We need to now create an instance of this our &#8220;Rectangle&#8221; class so that we can showcase the logic that we have created.<\/p>\n\n\n\n<p>We create an instance like so &#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const rectangle = new Rectangle(10,10);\nconsole.log(rectangle.getArea()); \/\/100<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Full Working Code:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>class Rectangle{\nconstructor(width, height){\nthis.width = width;\nthis.height = height;\n}\n\n\/\/Method\ncalcArea(){\nreturn this.width * this.height;\n}\n\n\/\/Getter\ngetArea(){\nreturn this.calcArea();\n}\n}\n\nconst rectangle = new Rectangle(10,10);\nconsole.log(rectangle.getArea()); \/\/100<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates<\/p>\n","protected":false},"author":1,"featured_media":318,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Javascript: Working With Classes<\/title>\n<meta name=\"description\" content=\"Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Javascript: Working With Classes\" \/>\n<meta property=\"og:description\" content=\"Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/codeflretech\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-20T03:00:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-20T03:22:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"635\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"codeflare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeflaretech\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/\"},\"author\":{\"name\":\"codeflare\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\"},\"headline\":\"Javascript: Working With Classes\",\"datePublished\":\"2021-01-20T03:00:15+00:00\",\"dateModified\":\"2021-01-20T03:22:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/\"},\"wordCount\":287,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/classes.jpg\",\"articleSection\":[\"javascript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/\",\"name\":\"Javascript: Working With Classes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/classes.jpg\",\"datePublished\":\"2021-01-20T03:00:15+00:00\",\"dateModified\":\"2021-01-20T03:22:46+00:00\",\"description\":\"Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/classes.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/classes.jpg\",\"width\":1024,\"height\":635,\"caption\":\"javascript:working with classes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-working-with-classes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"javascript\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Javascript: Working With Classes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\",\"name\":\"codeflare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"caption\":\"codeflare\"},\"description\":\"Latest tech news and coding tips.\",\"sameAs\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\",\"https:\\\/\\\/facebook.com\\\/codeflretech\",\"https:\\\/\\\/instagram.com\\\/codeflaretech\",\"https:\\\/\\\/x.com\\\/codeflaretech\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1\"],\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/watcher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Javascript: Working With Classes","description":"Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects.","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:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/","og_locale":"en_US","og_type":"article","og_title":"Javascript: Working With Classes","og_description":"Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects.","og_url":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/","article_author":"https:\/\/facebook.com\/codeflretech","article_published_time":"2021-01-20T03:00:15+00:00","article_modified_time":"2021-01-20T03:22:46+00:00","og_image":[{"width":1024,"height":635,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg","type":"image\/jpeg"}],"author":"codeflare","twitter_card":"summary_large_image","twitter_creator":"@codeflaretech","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/"},"author":{"name":"codeflare","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a"},"headline":"Javascript: Working With Classes","datePublished":"2021-01-20T03:00:15+00:00","dateModified":"2021-01-20T03:22:46+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/"},"wordCount":287,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg","articleSection":["javascript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/","url":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/","name":"Javascript: Working With Classes","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg","datePublished":"2021-01-20T03:00:15+00:00","dateModified":"2021-01-20T03:22:46+00:00","description":"Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects.","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg","width":1024,"height":635,"caption":"javascript:working with classes"},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-working-with-classes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"javascript","item":"https:\/\/codeflarelimited.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"Javascript: Working With Classes"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a","name":"codeflare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","caption":"codeflare"},"description":"Latest tech news and coding tips.","sameAs":["https:\/\/codeflarelimited.com\/blog","https:\/\/facebook.com\/codeflretech","https:\/\/instagram.com\/codeflaretech","https:\/\/x.com\/codeflaretech","https:\/\/www.youtube.com\/channel\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1"],"url":"https:\/\/codeflarelimited.com\/blog\/author\/watcher\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/01\/classes.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":2,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":319,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/313\/revisions\/319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/318"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}