{"id":3264,"date":"2016-06-28T21:43:22","date_gmt":"2016-06-28T20:43:22","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=3264"},"modified":"2016-06-28T21:43:22","modified_gmt":"2016-06-28T20:43:22","slug":"practical-c-programming-using-fmod-to-find-float-remainder","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/practical-c-programming-using-fmod-to-find-float-remainder\/","title":{"rendered":"Practical C Programming &#8211; Unitsconverter Prog: using fmod for float remainder"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3264\" class=\"pvc_stats all  \" data-element-id=\"3264\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>I wanted to extend the Imperial\/metric converter further, by adding feet to the cm to inches conversion, so human heights could be displayed in a \"6ft, 2in\" style. It still needs the maths debugging for the whole 6 feet value remainder issue as shown:<\/p>\n<p><center><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/Dx4x1IDoaDY?autoplay=1&amp;version=3&amp;loop=1&amp;playlist=Dx4x1IDoaDY\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center>&nbsp;<\/p>\n<p>I struggled with the logic and units for ages with this, as I knew I had to convert the fractional part of a foot to inches but did not know how to modify\u00a0the modulus for integers (x%y) for float values to strip away the fraction then convert that back to imperial and \"add it\" back to the larger foot value as a rounded nearest inch.<\/p>\n<p>I finally found an example explaining it needs the math.h lib - as other functions like power, square root, sin etc. do - and the simple format of remainder = fmod(dividend, divisor);<\/p>\n<p>This resulted in the following extended code:<\/p>\n<p><span style=\"color: #ff0000;\">case '4':<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"Want to convert (c) cm to inches\/feet or (i) inches to cm?: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%c\", &amp;operator);<\/span><br \/>\n<span style=\"color: #ff0000;\"> switch (operator)<\/span><br \/>\n<span style=\"color: #ff0000;\"> {<\/span><br \/>\n<span style=\"color: #ff0000;\"> case 'c':<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"c: convert cm to inches. Enter cm value: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%f\", &amp;cm);<\/span><br \/>\n<span style=\"color: #ff0000;\"> inches = cm * 0.393701;<\/span><br \/>\n<span style=\"color: #ff0000;\"> feet = inches\/12;<\/span><br \/>\n<span style=\"color: #ff0000;\"> <strong>remaining = fmod(inches,12);<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.2f cm is %0.2f inches, or %0.0fft,%0.0lf ins! \\n\\n\", cm,inches,feet,remaining);<\/span><br \/>\n<span style=\"color: #ff0000;\"> break;<\/span><br \/>\n<span style=\"color: #ff0000;\"> case 'i':<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"i: convert inches to cm. Enter inches value: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%f\", &amp;inches);<\/span><br \/>\n<span style=\"color: #ff0000;\"> cm = 1\/0.393701*inches;<\/span><br \/>\n<span style=\"color: #ff0000;\"> feet = inches\/12;<\/span><br \/>\n<span style=\"color: #ff0000;\"> remaining = fmod(inches,12);<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.0f \\n\", remaining);<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.1f inches is %0.1f cm or %0.0fft,%0.0lf ins! \\n\\n\", inches,cm,feet,remaining);<\/span><br \/>\n<span style=\"color: #ff0000;\"> }<\/span><br \/>\n<span style=\"color: #ff0000;\"> break;<\/span><br \/>\n<span style=\"color: #ff0000;\"> default:<\/span><br \/>\n<span style=\"color: #ff0000;\"> {<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"Invalid key, try again! %c\\n\\n\", operator);<\/span><\/p>\n<p>etc...<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/06\/unitconvheight.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3265\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/06\/unitconvheight.png\" alt=\"unitconvheight,png\" width=\"851\" height=\"765\" \/><\/a><\/p>\n<p>To see how the maths works in the section:<\/p>\n<p><span style=\"color: #ff0000;\">printf(\"i: convert inches to cm. Enter inches value: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%f\", &amp;inches);<\/span><br \/>\n<span style=\"color: #ff0000;\"> cm = 1\/0.393701*inches;<\/span><br \/>\n<span style=\"color: #ff0000;\"> feet = inches\/12;<\/span><br \/>\n<span style=\"color: #ff0000;\"> remaining = fmod(inches,12);<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.0f \\n\", remaining); <span style=\"color: #0000ff;\">\/*temp test line to show the actual result of the fmod *\/<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.1f inches is %0.1f cm or<strong> %0.0fft,%0.0f ins!<\/strong> \\n\\n\", inches,cm,<strong>feet<\/strong>,<strong>remaining<\/strong>);<\/span><\/p>\n<p>The input is in inches in the first sub menu above, so that is converted to cm\u00a0first as a fixed value.<\/p>\n<p>The rounded nearest feet value is also\u00a0converted as a fixed value.<\/p>\n<p>To find the fractions of a foot, the fmod gives the excess (\"<em><strong>float remaining;<\/strong><\/em>\" declaration) as a decimal for inch values that are not exact multiples of 12. This remainder\u00a0modulus of a foot is truncated or rounded to the nearest inch by allowing only a 0 decimal place float holder as %0.0f.<\/p>\n<p>For example, 24 inches shows no \"remaining\" when fmod'd by 12, giving a 0 ins result, but 14 inches has a remainder 2.<\/p>\n<p>The conversions are not exact but adequate, as 12.5 inches gets rounded down<strong><em>\u00a0<\/em><\/strong>to 1ft, 0 in; and 12.6 inches gets rounded up to 1ft, 1 in. Ideal\u00a0for this exercise.<\/p>\n<p>I can now look at modifying the kg\/pounds\u00a0case for ounces in a similar way.<\/p>\n<p>I tested the same values in reverse to check they were rounded closely enough to make sense below i.e. 33cm = 13ins = 12.99ins<\/p>\n<p>This case 4 sub menu section now outputs:<\/p>\n<p><span style=\"color: #0000ff;\">.\/unitsconverter2<\/span><br \/>\n<span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">4<\/span><br \/>\n<span style=\"color: #ff0000;\">Want to convert (c) cm to inches\/feet or (i) inches to cm?: i<\/span><br \/>\n<span style=\"color: #ff0000;\">i: convert inches to cm. Enter inches value: 13<\/span><br \/>\n<span style=\"color: #ff0000;\">1 <\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>13.0 inches<\/strong> is 33.0 cm or <strong>1ft,1 ins!<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">4<\/span><br \/>\n<span style=\"color: #ff0000;\">Want to convert (c) cm to inches\/feet or (i) inches to cm?: i<\/span><br \/>\n<span style=\"color: #ff0000;\">i: convert inches to cm. Enter inches value: 72<\/span><br \/>\n<span style=\"color: #ff0000;\">0 <\/span><br \/>\n<span style=\"color: #ff0000;\">72.0 inches is 182.9 cm or <strong>6ft,0 ins!<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">4<\/span><br \/>\n<span style=\"color: #ff0000;\">Want to convert (c) cm to inches\/feet or (i) inches to cm?: i<\/span><br \/>\n<span style=\"color: #ff0000;\">i: convert inches to cm. Enter inches value: 65<\/span><br \/>\n<span style=\"color: #ff0000;\">5 <\/span><br \/>\n<span style=\"color: #ff0000;\">65.0 inches is 165.1 cm or <strong>5ft,5 ins!<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">4<\/span><br \/>\n<span style=\"color: #ff0000;\">Want to convert (c) cm to inches\/feet or (i) inches to cm?: c<\/span><br \/>\n<span style=\"color: #ff0000;\">c: convert cm to inches. Enter cm value: 33<\/span><br \/>\n<span style=\"color: #ff0000;\">33.00 cm is <strong>12.99 inches<\/strong>, or <strong>1ft,1 ins!<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">4<\/span><br \/>\n<span style=\"color: #ff0000;\">Want to convert (c) cm to inches\/feet or (i) inches to cm?: c<\/span><br \/>\n<span style=\"color: #ff0000;\">c: convert cm to inches. Enter cm value: 184<\/span><br \/>\n<span style=\"color: #ff0000;\">184.00 cm is 72.44 inches, or <strong>6ft,0 ins!<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">w<\/span><br \/>\n<span style=\"color: #ff0000;\">Invalid key, try again! w<\/span><\/p>\n<p><span style=\"color: #ff0000;\">program to convert Imperial units to metric. Enter menu option: <\/span><br \/>\n<span style=\"color: #ff0000;\">1: km to miles<\/span><br \/>\n<span style=\"color: #ff0000;\">2: litres to pints<\/span><br \/>\n<span style=\"color: #ff0000;\">3: kg to pounds<\/span><br \/>\n<span style=\"color: #ff0000;\">4: cm to inches<\/span><br \/>\n<span style=\"color: #ff0000;\">q: quit<\/span><br \/>\n<span style=\"color: #ff0000;\">q<\/span><\/p>\n<p><strong>8\/9\/16 Just revisited this for revision and the answer to the incorrect 6ft problem is a simple rounding up issue solved by defining feet as an integer to round it down to correct feet; not a float! Duh...<\/strong><\/p>\n<p><span style=\"color: #ff0000;\">case '4':<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"Want to convert (c) cm to inches\/feet or (i) inches to cm?: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%c\", &amp;operator);<\/span><br \/>\n<span style=\"color: #ff0000;\"> switch (operator)<\/span><br \/>\n<span style=\"color: #ff0000;\"> {<\/span><br \/>\n<span style=\"color: #ff0000;\"> case 'c':<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"c: convert cm to inches. Enter cm value: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%f\", &amp;cm);<\/span><br \/>\n<span style=\"color: #ff0000;\"> inches = cm\/2.54;<\/span><br \/>\n<span style=\"color: #ff0000;\"> feet = inches\/12;<\/span><br \/>\n<span style=\"color: #ff0000;\"> remaining = fmod(inches,12);<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.1f cm is %0.1f inches, or<strong> %dft,<\/strong>%0.00f ins \\n\\n\", cm,inches,feet,remaining);<\/span><br \/>\n<span style=\"color: #ff0000;\"> break;<\/span><br \/>\n<span style=\"color: #ff0000;\"> case 'i':<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"i: convert inches to cm. Enter inches value: \");<\/span><br \/>\n<span style=\"color: #ff0000;\"> fgets(line, sizeof(line), stdin);<\/span><br \/>\n<span style=\"color: #ff0000;\"> sscanf(line, \"%f\", &amp;inches);<\/span><br \/>\n<span style=\"color: #ff0000;\"> cm = inches*2.54;<\/span><br \/>\n<span style=\"color: #ff0000;\"> feet = inches\/12;<\/span><br \/>\n<span style=\"color: #ff0000;\"> remaining = fmod(inches,12);<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.0f \\n\", remaining);<\/span><br \/>\n<span style=\"color: #ff0000;\"> printf(\"%0.1f inches is %0.1f cm or <strong>%dft<\/strong>,%0.00f ins \\n\\n\", inches,cm,feet,remaining);<\/span><br \/>\n<span style=\"color: #ff0000;\"> }<\/span><br \/>\n<span style=\"color: #ff0000;\"> break;<\/span><\/p>\n<p>The full version incl. ounces and yards is here:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/06\/unitsconverter2-1.c\">unitsconverter2.c<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3264\" class=\"pvc_stats all  \" data-element-id=\"3264\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>I wanted to extend the Imperial\/metric converter further, by adding feet to the cm to inches conversion, so human heights could be displayed in a \"6ft, 2in\" style. It still needs the maths debugging for the whole 6 feet value remainder issue as shown: &nbsp; I struggled with the logic and units for ages with <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/practical-c-programming-using-fmod-to-find-float-remainder\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Practical C Programming &#8211; Unitsconverter Prog: using fmod for float remainder<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3264","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":2,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/3264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=3264"}],"version-history":[{"count":0,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/3264\/revisions"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=3264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=3264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=3264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}