{"id":1098327,"date":"2025-01-08T15:20:10","date_gmt":"2025-01-08T07:20:10","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1098327.html"},"modified":"2025-01-08T15:20:12","modified_gmt":"2025-01-08T07:20:12","slug":"python%e5%a6%82%e4%bd%95%e8%bd%ac%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%a0%bc%e5%bc%8f%e8%bd%ac%e6%8d%a2-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1098327.html","title":{"rendered":"python\u5982\u4f55\u8f6c\u5b57\u7b26\u4e32\u683c\u5f0f\u8f6c\u6362"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24212710\/2ee7e239-764e-4cdc-bff4-34073d4704a0.webp\" alt=\"python\u5982\u4f55\u8f6c\u5b57\u7b26\u4e32\u683c\u5f0f\u8f6c\u6362\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u5c06\u5b57\u7b26\u4e32\u683c\u5f0f\u8fdb\u884c\u8f6c\u6362\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u5177\u4f53\u65b9\u6cd5\u53d6\u51b3\u4e8e\u9700\u8981\u8f6c\u6362\u7684\u5177\u4f53\u683c\u5f0f\u3002\u4f8b\u5982\uff0c\u5c06\u5b57\u7b26\u4e32\u4ece\u4e00\u79cd\u7f16\u7801\u8f6c\u6362\u4e3a\u53e6\u4e00\u79cd\u7f16\u7801\u3001\u6539\u53d8\u5b57\u7b26\u4e32\u7684\u65e5\u671f\u683c\u5f0f\u3001\u6216\u662f\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u7279\u5b9a\u7684\u6570\u503c\u683c\u5f0f\u7b49\u3002<strong>\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u65e5\u671f\u65f6\u95f4\u6a21\u5757\u7b49<\/strong>\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u8fdb\u884c\u7b80\u5355\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u8fdb\u884c\u5b57\u7b26\u4e32\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>Python\u5185\u7f6e\u4e86\u8bb8\u591a\u51fd\u6570\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u5b57\u7b26\u4e32\u683c\u5f0f\u7684\u8f6c\u6362\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1. str() \u51fd\u6570<\/h4>\n<\/p>\n<p><p><code>str()<\/code> \u51fd\u6570\u53ef\u4ee5\u5c06\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002\u6bd4\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u6574\u6570\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<\/p>\n<p>num = 123<\/p>\n<p>num_str = str(num)<\/p>\n<p>print(num_str)  # \u8f93\u51fa\uff1a&#39;123&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. int() \u51fd\u6570<\/h4>\n<\/p>\n<p><p><code>int()<\/code> \u51fd\u6570\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570<\/p>\n<p>num_str = &quot;123&quot;<\/p>\n<p>num = int(num_str)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a123<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. float() \u51fd\u6570<\/h4>\n<\/p>\n<p><p><code>float()<\/code> \u51fd\u6570\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570<\/p>\n<p>float_str = &quot;123.45&quot;<\/p>\n<p>num_float = float(float_str)<\/p>\n<p>print(num_float)  # \u8f93\u51fa\uff1a123.45<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4. format() \u65b9\u6cd5<\/h4>\n<\/p>\n<p><p><code>format()<\/code> \u65b9\u6cd5\u53ef\u4ee5\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\uff0c\u53ef\u4ee5\u7528\u6765\u63a7\u5236\u5c0f\u6570\u70b9\u7684\u4f4d\u6570\u3001\u65e5\u671f\u683c\u5f0f\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u63a7\u5236\u5c0f\u6570\u70b9\u4f4d\u6570<\/p>\n<p>num = 123.4567<\/p>\n<p>formatted_str = &quot;{:.2f}&quot;.format(num)<\/p>\n<p>print(formatted_str)  # \u8f93\u51fa\uff1a&#39;123.46&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u5b57\u7b26\u4e32\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u5904\u7406\u5b57\u7b26\u4e32\u683c\u5f0f\u8f6c\u6362\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u7279\u522b\u662f\u5bf9\u590d\u6742\u5b57\u7b26\u4e32\u7684\u5339\u914d\u4e0e\u66ff\u6362\u3002Python \u63d0\u4f9b\u4e86 <code>re<\/code> \u6a21\u5757\u6765\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>1. re.sub() \u51fd\u6570<\/h4>\n<\/p>\n<p><p><code>re.sub()<\/code> \u51fd\u6570\u53ef\u4ee5\u6839\u636e\u6b63\u5219\u8868\u8fbe\u5f0f\u66ff\u6362\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<h2><strong>\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u6570\u5b57\u66ff\u6362\u4e3a &#39;*&#39;<\/strong><\/h2>\n<p>text = &quot;The price is 100 dollars&quot;<\/p>\n<p>new_text = re.sub(r&#39;\\d+&#39;, &#39;*&#39;, text)<\/p>\n<p>print(new_text)  # \u8f93\u51fa\uff1a&#39;The price is * dollars&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. re.match() \u548c re.search() \u51fd\u6570<\/h4>\n<\/p>\n<p><p><code>re.match()<\/code> \u548c <code>re.search()<\/code> \u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u7b26\u5408\u7279\u5b9a\u6a21\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u6570\u5b57\u5f00\u5934<\/p>\n<p>pattern = r&#39;^\\d&#39;<\/p>\n<p>text = &quot;123abc&quot;<\/p>\n<p>match = re.match(pattern, text)<\/p>\n<p>if match:<\/p>\n<p>    print(&quot;\u5339\u914d\u6210\u529f&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u5339\u914d\u5931\u8d25&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u65e5\u671f\u65f6\u95f4\u6a21\u5757\u8fdb\u884c\u65e5\u671f\u683c\u5f0f\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u65e5\u671f\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\u8f6c\u6362\uff0cPython \u63d0\u4f9b\u4e86 <code>datetime<\/code> \u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><h4>1. datetime.strptime() \u548c datetime.strftime() \u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u8fd9\u4e24\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u89e3\u6790\u548c\u683c\u5f0f\u5316\u65e5\u671f\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<h2><strong>\u5c06\u65e5\u671f\u5b57\u7b26\u4e32\u89e3\u6790\u4e3a datetime \u5bf9\u8c61<\/strong><\/h2>\n<p>date_str = &quot;2023-10-01&quot;<\/p>\n<p>date_obj = datetime.strptime(date_str, &#39;%Y-%m-%d&#39;)<\/p>\n<h2><strong>\u5c06 datetime \u5bf9\u8c61\u683c\u5f0f\u5316\u4e3a\u65b0\u7684\u65e5\u671f\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>new_date_str = date_obj.strftime(&#39;%d\/%m\/%Y&#39;)<\/p>\n<p>print(new_date_str)  # \u8f93\u51fa\uff1a&#39;01\/10\/2023&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528 dateutil.parser \u6a21\u5757<\/h4>\n<\/p>\n<p><p><code>dateutil.parser<\/code> \u6a21\u5757\u53ef\u4ee5\u81ea\u52a8\u89e3\u6790\u5927\u591a\u6570\u65e5\u671f\u5b57\u7b26\u4e32\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a <code>datetime<\/code> \u5bf9\u8c61\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from dateutil.parser import parse<\/p>\n<h2><strong>\u81ea\u52a8\u89e3\u6790\u65e5\u671f\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>date_str = &quot;October 1, 2023&quot;<\/p>\n<p>date_obj = parse(date_str)<\/p>\n<p>print(date_obj)  # \u8f93\u51fa\uff1a2023-10-01 00:00:00<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u5176\u4ed6\u683c\u5f0f\u7684\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u5b57\u7b26\u4e32\u683c\u5f0f\u8f6c\u6362\u4efb\u52a1\uff0c\u53ef\u80fd\u9700\u8981\u7f16\u5199\u81ea\u5b9a\u4e49\u51fd\u6570\u6765\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><h4>1. \u7f16\u5199\u81ea\u5b9a\u4e49\u51fd\u6570<\/h4>\n<\/p>\n<p><p>\u81ea\u5b9a\u4e49\u51fd\u6570\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u590d\u6742\u7684\u5b57\u7b26\u4e32\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u81ea\u5b9a\u4e49\u51fd\u6570\u5c06\u9a7c\u5cf0\u547d\u540d\u6cd5\u8f6c\u6362\u4e3a\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5<\/p>\n<p>def camel_to_snake(name):<\/p>\n<p>    import re<\/p>\n<p>    s1 = re.sub(&#39;(.)([A-Z][a-z]+)&#39;, r&#39;\\1_\\2&#39;, name)<\/p>\n<p>    return re.sub(&#39;([a-z0-9])([A-Z])&#39;, r&#39;\\1_\\2&#39;, s1).lower()<\/p>\n<p>camel_case = &quot;CamelCaseString&quot;<\/p>\n<p>snake_case = camel_to_snake(camel_case)<\/p>\n<p>print(snake_case)  # \u8f93\u51fa\uff1a&#39;camel_case_string&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/h4>\n<\/p>\n<p><p>\u6709\u4e9b\u7b2c\u4e09\u65b9\u5e93\u4e13\u95e8\u7528\u4e8e\u5904\u7406\u7279\u5b9a\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u4f8b\u5982 <code>pandas<\/code> \u5e93\u5bf9\u4e8e\u5904\u7406\u8868\u683c\u6570\u636e\u975e\u5e38\u65b9\u4fbf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u5c06 CSV \u6587\u4ef6\u4e2d\u7684\u6570\u636e\u8f6c\u6362\u4e3a DataFrame<\/strong><\/h2>\n<p>df = pd.read_csv(&#39;data.csv&#39;)<\/p>\n<h2><strong>\u5c06 DataFrame \u4e2d\u7684\u65e5\u671f\u5217\u8f6c\u6362\u4e3a\u65b0\u7684\u683c\u5f0f<\/strong><\/h2>\n<p>df[&#39;Date&#39;] = pd.to_datetime(df[&#39;Date&#39;]).dt.strftime(&#39;%d\/%m\/%Y&#39;)<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\u8fdb\u884c\u5b57\u7b26\u4e32\u683c\u5f0f\u8f6c\u6362\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u9700\u6c42\u3002\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u65e5\u671f\u65f6\u95f4\u6a21\u5757\u4ee5\u53ca\u7b2c\u4e09\u65b9\u5e93\u7b49\u8fdb\u884c\u4e0d\u540c\u7c7b\u578b\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u3002<strong>\u6700\u91cd\u8981\u7684\u662f\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5<\/strong>\uff0c\u4ee5\u4fbf\u80fd\u591f\u9ad8\u6548\u3001\u51c6\u786e\u5730\u5b8c\u6210\u5b57\u7b26\u4e32\u683c\u5f0f\u7684\u8f6c\u6362\u4efb\u52a1\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u6570\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>str()<\/code>\u51fd\u6570\u5c06\u6570\u5b57\u7c7b\u578b\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff0c<code>num = 123<\/code>\uff0c\u53ef\u4ee5\u901a\u8fc7<code>str(num)<\/code>\u5c06\u5176\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<code>&quot;123&quot;<\/code>\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u6574\u6570\u3001\u6d6e\u70b9\u6570\u4ee5\u53ca\u5176\u4ed6\u57fa\u672c\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u7684\u65b9\u6cd5\u3002\u5e38\u7528\u7684\u6709<code>f-string<\/code>\u3001<code>format()<\/code>\u65b9\u6cd5\u548c\u767e\u5206\u53f7\u683c\u5f0f\u5316\u3002\u4f7f\u7528<code>f-string<\/code>\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u524d\u52a0\u4e0a<code>f<\/code>\u5e76\u7528\u82b1\u62ec\u53f7\u5305\u56f4\u53d8\u91cf\uff0c\u4f8b\u5982\uff1a<code>name = &quot;Alice&quot;<\/code>\uff0c\u53ef\u4ee5\u5199\u6210<code>f&quot;Hello, {name}&quot;<\/code>\u3002<code>format()<\/code>\u65b9\u6cd5\u5219\u5141\u8bb8\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u5360\u4f4d\u7b26\uff0c\u5982<code>&quot;Hello, {}&quot;.format(name)<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5904\u7406\u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\u53ef\u4ee5\u4f7f\u7528\u53cd\u659c\u6760\uff08<code>\\<\/code>\uff09\u8fdb\u884c\u8f6c\u4e49\u3002\u4f8b\u5982\uff0c\u82e5\u60f3\u5728\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u5f15\u53f7\uff0c\u53ef\u4ee5\u5199\u6210<code>&quot;He s<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>d, \\&quot;Hello!\\&quot;&quot;<\/code>\uff0c\u8fd9\u6837Python\u5c31\u4f1a\u6b63\u786e\u8bc6\u522b\u5b57\u7b26\u4e32\u4e2d\u7684\u5f15\u53f7\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u539f\u59cb\u5b57\u7b26\u4e32\uff08\u52a0\u4e0a<code>r<\/code>\u524d\u7f00\uff09\uff0c\u4f8b\u5982<code>r&quot;Hello\\nWorld&quot;<\/code>\uff0c\u53ef\u4ee5\u907f\u514d\u8f6c\u4e49\u5b57\u7b26\u7684\u5904\u7406\uff0c\u4f7f\u5b57\u7b26\u4e32\u6309\u539f\u6837\u8f93\u51fa\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5c06\u5b57\u7b26\u4e32\u683c\u5f0f\u8fdb\u884c\u8f6c\u6362\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u5177\u4f53\u65b9\u6cd5\u53d6\u51b3\u4e8e\u9700\u8981\u8f6c\u6362\u7684\u5177\u4f53\u683c\u5f0f\u3002\u4f8b\u5982\uff0c\u5c06\u5b57\u7b26\u4e32\u4ece\u4e00\u79cd\u7f16\u7801 [&hellip;]","protected":false},"author":3,"featured_media":1098339,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098327"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1098327"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098327\/revisions"}],"predecessor-version":[{"id":1098343,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098327\/revisions\/1098343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1098339"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1098327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1098327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1098327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}