{"id":224,"date":"2020-08-31T17:46:49","date_gmt":"2020-08-31T17:46:49","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/cplusplus\/?p=224"},"modified":"2020-08-31T17:46:49","modified_gmt":"2020-08-31T17:46:49","slug":"c-oop-constructors","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/","title":{"rendered":"C++ OOP &#8211; Constructors"},"content":{"rendered":"<p>In this lesson, we will cover Constructors and Copy Constructors in C++ under the following topics:<\/p>\n<ol>\n<li><a href=\"#t1\">What is a Constructor?<\/a><\/li>\n<li><a href=\"#t2\">Parameterized Constructors<\/a><\/li>\n<li><a href=\"#t3\">Copy Constructor<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. What is a Constructor?<\/strong><\/h4>\n<p>A constructor in C++ is special\u00a0 member function of a class that is automatically called whenever a new object is created.<\/p>\n<p>A constructor has the following properties:<\/p>\n<ul>\n<li>the same name as the class<\/li>\n<li>does not have a return type<\/li>\n<\/ul>\n<p><strong>Default constructor:<\/strong> C++ provides a default constructor. This is a constructor that accepts no parameters. For example<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">class<\/span>  <span style=\"color: #bb0066; font-weight: bold;\">Circle<\/span>{\r\n   <span style=\"color: #997700; font-weight: bold;\">public:<\/span>\r\n\r\n    <span style=\"color: #888888;\">\/\/ create a constructor<\/span>\r\n    Circle() {\r\n        <span style=\"color: #888888;\">\/\/ code<\/span>\r\n    }\r\n};\r\n<\/pre>\n<p>Here, the function Circle() is a constructor of the class Circle. The program below show the use of default constructor<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/ Program to demonstrate default constructor<\/span>\r\n<span style=\"color: #557799;\">#include &lt;iostream&gt;<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold;\">using<\/span> <span style=\"color: #008800; font-weight: bold;\">namespace<\/span> std;\r\n\r\n<span style=\"color: #888888;\">\/\/ declare a class, circle<\/span>\r\n<span style=\"color: #008800; font-weight: bold;\">class<\/span>  <span style=\"color: #bb0066; font-weight: bold;\">Circle<\/span> {\r\n\r\n  <span style=\"color: #997700; font-weight: bold;\">private:<\/span>\r\n       <span style=\"color: #333399; font-weight: bold;\">double<\/span> radius;\r\n\r\n   <span style=\"color: #997700; font-weight: bold;\">public:<\/span>\r\n    <span style=\"color: #888888;\">\/\/ create a constructor<\/span>\r\n    Circle() {\r\n\r\n        <span style=\"color: #888888;\">\/\/ initialize private variables<\/span>\r\n        radius <span style=\"color: #333333;\">=<\/span> <span style=\"color: #6600ee; font-weight: bold;\">7.5<\/span>;\r\n\r\n        cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Creating a circle.\"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> endl;\r\n        cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Radius = \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> radius <span style=\"color: #333333;\">&lt;&lt;<\/span> endl;\r\n    }\r\n};\r\n\r\n<span style=\"color: #333399; font-weight: bold;\">int<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span>() {\r\n\r\n    <span style=\"color: #888888;\">\/\/ create an object<\/span>\r\n    Circle circle;\r\n\r\n    <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>;\r\n}\r\n<\/pre>\n<p>The output is:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">Creating a circle.\r\nRadius = 7.5\r\n<\/pre>\n<p>However, not that if we fail to provide a default constructor, C++ compiler will provide one implicitly.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Parameterized Constructor<\/strong><\/h4>\n<p>A constructor that accepts parameters is called a parameterized constructor. This is the preferred approach to initializing data members.<\/p>\n<p>The program below illustrates parameterized constructor;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #557799;\">#include &lt;iostream&gt;<\/span>\r\n<span style=\"color: #557799;\">#include &lt;math.h&gt;       <\/span><span style=\"color: #888888;\">\/* pow *\/<\/span>\r\n\r\n\r\n<span style=\"color: #008800; font-weight: bold;\">using<\/span> <span style=\"color: #008800; font-weight: bold;\">namespace<\/span> std;\r\n\r\n<span style=\"color: #888888;\">\/\/ declare a class, circle<\/span>\r\n<span style=\"color: #008800; font-weight: bold;\">class<\/span>  <span style=\"color: #bb0066; font-weight: bold;\">Cylinder<\/span> {\r\n\r\n  <span style=\"color: #997700; font-weight: bold;\">private:<\/span>\r\n       <span style=\"color: #333399; font-weight: bold;\">double<\/span> radius;\r\n       <span style=\"color: #333399; font-weight: bold;\">double<\/span> height;\r\n\r\n   <span style=\"color: #997700; font-weight: bold;\">public:<\/span>\r\n    <span style=\"color: #888888;\">\/\/ create a parameterized constructor<\/span>\r\n    Cylinder(<span style=\"color: #333399; font-weight: bold;\">double<\/span> r, <span style=\"color: #333399; font-weight: bold;\">double<\/span> h) {\r\n    \t<span style=\"color: #888888;\">\/\/ Initialise the member variables<\/span>\r\n    \tradius <span style=\"color: #333333;\">=<\/span> r;\r\n    \theight <span style=\"color: #333333;\">=<\/span> h;\r\n    }\r\n\r\n    <span style=\"color: #333399; font-weight: bold;\">double<\/span> calculateVolume(){\r\n    \t<span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"color: #0000dd; font-weight: bold;\">22<\/span><span style=\"color: #333333;\">\/<\/span><span style=\"color: #0000dd; font-weight: bold;\">7<\/span> <span style=\"color: #333333;\">*<\/span> pow(radius,<span style=\"color: #0000dd; font-weight: bold;\">2<\/span>) <span style=\"color: #333333;\">*<\/span> height;\r\n    }\r\n};\r\n\r\n<span style=\"color: #333399; font-weight: bold;\">int<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span>() {\r\n\r\n    <span style=\"color: #888888;\">\/\/ create a cylinder with parameters<\/span>\r\n    Cylinder cylinder1(<span style=\"color: #6600ee; font-weight: bold;\">10.2<\/span>, <span style=\"color: #6600ee; font-weight: bold;\">5.3<\/span>);\r\n    Cylinder cylinder2(<span style=\"color: #6600ee; font-weight: bold;\">20.5<\/span>, <span style=\"color: #6600ee; font-weight: bold;\">2.5<\/span>);\r\n\r\n    cout <span style=\"color: #333333;\">&lt;&lt;<\/span><span style=\"background-color: #fff0f0;\">\"Volume 1: \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> cylinder1.calculateVolume() <span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n    cout <span style=\"color: #333333;\">&lt;&lt;<\/span><span style=\"background-color: #fff0f0;\">\"Volume 2: \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> cylinder2.calculateVolume() <span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n    <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>;\r\n}\r\n<\/pre>\n<p>Output of the program<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">Volume 1: 1654.24\r\nVolume 2: 3151.88\r\n<\/pre>\n<p>Here we created a parameterized constructor Cylinder() with two parameters: radius and height. The values of these parameters are use to initialized the member variables when the Cylinder is instantiated.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Copy Constructor<\/strong><\/h4>\n<p>This is a constructor that instantiates an object by copying data from an existing object of the same class.<\/p>\n<p>A copy constructor\u00a0 is used for the following:<\/p>\n<ul>\n<li>Initialize on object from another object<\/li>\n<li>copy an object to pass as an argument to a function<\/li>\n<li>copy an object to return from a function<\/li>\n<\/ul>\n<p>Similar to normal constructor, if we don&#8217;t define a copy constructor, then the C++ compiler will define one implicitly.<\/p>\n<p>A copy constructor for\u00a0 our cylinder object is given below:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/ copy constructor with a Cylinder object as parameter<\/span>\r\nCylinder(Cylinder <span style=\"color: #333333;\">&amp;<\/span>obj) {\r\n    <span style=\"color: #888888;\">\/\/ initialize private variables<\/span>\r\n    radius <span style=\"color: #333333;\">=<\/span> obj.radius;\r\n    height <span style=\"color: #333333;\">=<\/span> obj.height;\r\n}\r\n<\/pre>\n<p>Notice in the code that the parameter to the copy constructor has the address of an object of the Cylinder class.<\/p>\n<p><strong>Final note<\/strong>: Although a constructor is used to initialize an object, they can also be used to perform certain operations when an object is created.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, we will cover Constructors and Copy Constructors in C++ under the following topics: What is a Constructor? Parameterized Constructors Copy Constructor &nbsp; &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2,35],"tags":[37],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-c-tutorials","category-oop","tag-constructors"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>C++ OOP - Constructors - C++ Tutorials<\/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\/cplusplus\/c-oop-constructors\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ OOP - Constructors - C++ Tutorials\" \/>\n<meta property=\"og:description\" content=\"In this lesson, we will cover Constructors and Copy Constructors in C++ under the following topics: What is a Constructor? Parameterized Constructors Copy Constructor &nbsp; &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/\" \/>\n<meta property=\"og:site_name\" content=\"C++ Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-31T17:46:49+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\\\/cplusplus\\\/c-oop-constructors\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#\\\/schema\\\/person\\\/59a11a9f72bb132f56f91ab9f8a58a0e\"},\"headline\":\"C++ OOP &#8211; Constructors\",\"datePublished\":\"2020-08-31T17:46:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/\"},\"wordCount\":322,\"commentCount\":1,\"keywords\":[\"Constructors\"],\"articleSection\":[\"C++ Tutorials\",\"OOP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/\",\"name\":\"C++ OOP - Constructors - C++ Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#website\"},\"datePublished\":\"2020-08-31T17:46:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#\\\/schema\\\/person\\\/59a11a9f72bb132f56f91ab9f8a58a0e\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-oop-constructors\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ OOP &#8211; Constructors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#website\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/\",\"name\":\"C++ Tutorials\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#\\\/schema\\\/person\\\/59a11a9f72bb132f56f91ab9f8a58a0e\",\"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\"},\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++ OOP - Constructors - C++ Tutorials","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\/cplusplus\/c-oop-constructors\/","og_locale":"en_US","og_type":"article","og_title":"C++ OOP - Constructors - C++ Tutorials","og_description":"In this lesson, we will cover Constructors and Copy Constructors in C++ under the following topics: What is a Constructor? Parameterized Constructors Copy Constructor &nbsp; &hellip;","og_url":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/","og_site_name":"C++ Tutorials","article_published_time":"2020-08-31T17:46:49+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\/cplusplus\/c-oop-constructors\/#article","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#\/schema\/person\/59a11a9f72bb132f56f91ab9f8a58a0e"},"headline":"C++ OOP &#8211; Constructors","datePublished":"2020-08-31T17:46:49+00:00","mainEntityOfPage":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/"},"wordCount":322,"commentCount":1,"keywords":["Constructors"],"articleSection":["C++ Tutorials","OOP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/","url":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/","name":"C++ OOP - Constructors - C++ Tutorials","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#website"},"datePublished":"2020-08-31T17:46:49+00:00","author":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#\/schema\/person\/59a11a9f72bb132f56f91ab9f8a58a0e"},"breadcrumb":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-oop-constructors\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kindsonthegenius.com\/cplusplus\/"},{"@type":"ListItem","position":2,"name":"C++ OOP &#8211; Constructors"}]},{"@type":"WebSite","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#website","url":"https:\/\/kindsonthegenius.com\/cplusplus\/","name":"C++ Tutorials","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kindsonthegenius.com\/cplusplus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#\/schema\/person\/59a11a9f72bb132f56f91ab9f8a58a0e","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"},"url":"https:\/\/kindsonthegenius.com\/cplusplus\/author\/kindsonthegenius-3\/"}]}},"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":1,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/224\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}