{"id":1082275,"date":"2025-01-08T12:47:20","date_gmt":"2025-01-08T04:47:20","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1082275.html"},"modified":"2025-01-08T12:47:22","modified_gmt":"2025-01-08T04:47:22","slug":"python%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e6%98%af%e4%b8%8d%e6%98%af%e6%95%b0%e5%ad%97%e7%9a%84%e6%96%b9%e6%b3%95-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1082275.html","title":{"rendered":"python\u5982\u4f55\u5224\u65ad\u662f\u4e0d\u662f\u6570\u5b57\u7684\u65b9\u6cd5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24183901\/5086b2e8-0d51-42d9-a5a7-877e6f0d88e7.webp\" alt=\"python\u5982\u4f55\u5224\u65ad\u662f\u4e0d\u662f\u6570\u5b57\u7684\u65b9\u6cd5\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5224\u65ad\u4e00\u4e2a\u503c\u662f\u5426\u4e3a\u6570\u5b57\uff0c<strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\uff08\u5982isinstance()\u3001isdigit()\uff09\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5c1d\u8bd5\u8f6c\u6362\u7c7b\u578b\uff08\u5982int()\u3001float()\uff09<\/strong>\u7b49\u3002\u5176\u4e2d\uff0c\u4f7f\u7528\u5185\u7f6e\u51fd\u6570 isinstance() \u662f\u6700\u5e38\u89c1\u4e14\u76f4\u63a5\u7684\u65b9\u6cd5\u3002\u5b83\u53ef\u4ee5\u5224\u65ad\u4e00\u4e2a\u503c\u662f\u5426\u5c5e\u4e8e\u67d0\u4e2a\u7279\u5b9a\u7684\u7c7b\u578b\uff0c\u6bd4\u5982\u6574\u6570\u7c7b\u578b\uff08int\uff09\u6216\u6d6e\u70b9\u6570\u7c7b\u578b\uff08float\uff09\u3002\u63a5\u4e0b\u6765\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528 isinstance() \u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528 Python \u7684\u5185\u7f6e\u51fd\u6570 <code>isinstance()<\/code> \u53ef\u4ee5\u8f7b\u677e\u5224\u65ad\u4e00\u4e2a\u503c\u662f\u5426\u662f\u6570\u5b57\u3002\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u68c0\u67e5\u4e00\u4e2a\u5bf9\u8c61\u662f\u5426\u662f\u7279\u5b9a\u7c7b\u578b\u7684\u5b9e\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_number(value):<\/p>\n<p>    return isinstance(value, (int, float))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>isinstance()<\/code> \u51fd\u6570\u68c0\u67e5 <code>value<\/code> \u662f\u5426\u662f <code>int<\/code> \u6216 <code>float<\/code> \u7c7b\u578b\u7684\u5b9e\u4f8b\u3002\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u76f4\u89c2\u4e14\u9ad8\u6548\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528 isdigit() \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>isdigit()<\/code> \u65b9\u6cd5\u662f\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684\u65b9\u6cd5\uff0c\u7528\u4e8e\u5224\u65ad\u5b57\u7b26\u4e32\u662f\u5426\u53ea\u5305\u542b\u6570\u5b57\u5b57\u7b26\u3002\u4e0d\u8fc7\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5b83\u53ea\u80fd\u7528\u4e8e\u6574\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_integer(value):<\/p>\n<p>    if isinstance(value, str):<\/p>\n<p>        return value.isdigit()<\/p>\n<p>    return False<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u68c0\u67e5 <code>value<\/code> \u662f\u5426\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u7136\u540e\u8c03\u7528 <code>isdigit()<\/code> \u65b9\u6cd5\u3002\u5982\u679c\u5b57\u7b26\u4e32\u53ea\u5305\u542b\u6570\u5b57\u5b57\u7b26\uff0c\u8be5\u65b9\u6cd5\u8fd4\u56de <code>True<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/h3>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u590d\u6742\u7684\u5b57\u7b26\u4e32\u5339\u914d\u3002Python \u7684 <code>re<\/code> \u6a21\u5757\u63d0\u4f9b\u4e86\u5bf9\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u652f\u6301\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>def is_number(value):<\/p>\n<p>    pattern = re.compile(r&#39;^-?\\d+(\\.\\d+)?$&#39;)<\/p>\n<p>    return bool(pattern.match(value))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6b63\u5219\u8868\u8fbe\u5f0f <code>^ -?\\d+(\\.\\d+)?$<\/code> \u7528\u4e8e\u5339\u914d\u6574\u6570\u548c\u6d6e\u70b9\u6570\u3002<code>re.compile()<\/code> \u51fd\u6570\u7f16\u8bd1\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\uff0c<code>pattern.match()<\/code> \u65b9\u6cd5\u7528\u4e8e\u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u5339\u914d\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5c1d\u8bd5\u8f6c\u6362\u7c7b\u578b<\/h3>\n<\/p>\n<p><p>\u53e6\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u5c1d\u8bd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\u7c7b\u578b\uff0c\u5e76\u6355\u83b7\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u53d1\u751f\u7684\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_number(value):<\/p>\n<p>    try:<\/p>\n<p>        float(value)<\/p>\n<p>        return True<\/p>\n<p>    except ValueError:<\/p>\n<p>        return False<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5c1d\u8bd5\u5c06 <code>value<\/code> \u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002\u5982\u679c\u8f6c\u6362\u6210\u529f\uff0c\u5219\u8fd4\u56de <code>True<\/code>\uff1b\u5982\u679c\u629b\u51fa <code>ValueError<\/code> \u5f02\u5e38\uff0c\u5219\u8fd4\u56de <code>False<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u7efc\u5408\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u9c81\u68d2\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_number(value):<\/p>\n<p>    if isinstance(value, (int, float)):<\/p>\n<p>        return True<\/p>\n<p>    if isinstance(value, str):<\/p>\n<p>        try:<\/p>\n<p>            float(value)<\/p>\n<p>            return True<\/p>\n<p>        except ValueError:<\/p>\n<p>            return False<\/p>\n<p>    return False<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u68c0\u67e5 <code>value<\/code> \u662f\u5426\u662f <code>int<\/code> \u6216 <code>float<\/code> \u7c7b\u578b\uff1b\u7136\u540e\uff0c\u5982\u679c <code>value<\/code> \u662f\u5b57\u7b26\u4e32\uff0c\u5219\u5c1d\u8bd5\u5c06\u5176\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u4f7f\u7528\u81ea\u5b9a\u4e49\u7c7b<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u9ad8\u7ea7\u5e94\u7528\u4e2d\uff0c\u4f60\u53ef\u80fd\u4f1a\u521b\u5efa\u81ea\u5b9a\u4e49\u7c7b\uff0c\u5e76\u5e0c\u671b\u8fd9\u4e9b\u7c7b\u7684\u5b9e\u4f8b\u4e5f\u80fd\u88ab\u8bc6\u522b\u4e3a\u6570\u5b57\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u4ee5\u91cd\u8f7d <code>__float__<\/code> \u548c <code>__int__<\/code> \u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class CustomNumber:<\/p>\n<p>    def __init__(self, value):<\/p>\n<p>        self.value = value<\/p>\n<p>    def __float__(self):<\/p>\n<p>        return float(self.value)<\/p>\n<p>    def __int__(self):<\/p>\n<p>        return int(self.value)<\/p>\n<p>def is_number(value):<\/p>\n<p>    try:<\/p>\n<p>        float(value)<\/p>\n<p>        return True<\/p>\n<p>    except (ValueError, TypeError):<\/p>\n<p>        return False<\/p>\n<p>custom_num = CustomNumber(123.45)<\/p>\n<p>print(is_number(custom_num))  # True<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a <code>CustomNumber<\/code> \u7c7b\uff0c\u5e76\u91cd\u8f7d\u4e86 <code>__float__<\/code> \u548c <code>__int__<\/code> \u65b9\u6cd5\u3002\u8fd9\u6837\uff0c<code>CustomNumber<\/code> \u7c7b\u7684\u5b9e\u4f8b\u4e5f\u53ef\u4ee5\u88ab <code>is_number<\/code> \u51fd\u6570\u8bc6\u522b\u4e3a\u6570\u5b57\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u53ef\u4ee5\u7b80\u5316\u4ee3\u7801\u5e76\u63d0\u9ad8\u53ef\u9760\u6027\u3002\u4f8b\u5982\uff0c<code>numpy<\/code> \u5e93\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6570\u503c\u7c7b\u578b\u652f\u6301\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>def is_number(value):<\/p>\n<p>    return isinstance(value, (int, float, np.number))<\/p>\n<p>print(is_number(123))  # True<\/p>\n<p>print(is_number(123.45))  # True<\/p>\n<p>print(is_number(np.float64(123.45)))  # True<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>numpy<\/code> \u5e93\u6765\u68c0\u67e5\u503c\u662f\u5426\u662f\u6570\u5b57\u3002<code>np.number<\/code> \u662f <code>numpy<\/code> \u63d0\u4f9b\u7684\u6570\u503c\u7c7b\u578b\u57fa\u7c7b\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u5904\u7406\u7279\u6b8a\u6570\u503c<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u5e94\u7528\u4e2d\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u5904\u7406\u4e00\u4e9b\u7279\u6b8a\u6570\u503c\uff0c\u5982 <code>NaN<\/code>\uff08Not a Number\uff09\u548c <code>inf<\/code>\uff08Infinity\uff09\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>math<\/code> \u6a21\u5757\u4e2d\u7684 <code>isnan<\/code> \u548c <code>isinf<\/code> \u51fd\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>def is_number(value):<\/p>\n<p>    try:<\/p>\n<p>        num = float(value)<\/p>\n<p>        return not (math.isnan(num) or math.isinf(num))<\/p>\n<p>    except ValueError:<\/p>\n<p>        return False<\/p>\n<p>print(is_number(&#39;NaN&#39;))  # False<\/p>\n<p>print(is_number(&#39;inf&#39;))  # False<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5c06 <code>value<\/code> \u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff0c\u7136\u540e\u4f7f\u7528 <code>math.isnan<\/code> \u548c <code>math.isinf<\/code> \u51fd\u6570\u68c0\u67e5\u662f\u5426\u662f <code>NaN<\/code> \u6216 <code>inf<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5224\u65ad\u4e00\u4e2a\u503c\u662f\u5426\u4e3a\u6570\u5b57\u5728Python\u7f16\u7a0b\u4e2d\u662f\u4e00\u4e2a\u5e38\u89c1\u9700\u6c42\uff0c\u5177\u4f53\u65b9\u6cd5\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u5e94\u7528\u573a\u666f\u8fdb\u884c\u9009\u62e9\u3002<strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\uff08\u5982isinstance()\u3001isdigit()\uff09\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5c1d\u8bd5\u8f6c\u6362\u7c7b\u578b\uff08\u5982int()\u3001float()\uff09<\/strong>\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u7efc\u5408\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u9c81\u68d2\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u901a\u5e38\u4f1a\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u5728\u5404\u79cd\u60c5\u51b5\u4e0b\u90fd\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002\u540c\u65f6\uff0c\u4e5f\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u8fdb\u884c\u6269\u5c55\uff0c\u4f8b\u5982\u5904\u7406\u81ea\u5b9a\u4e49\u6570\u503c\u7c7b\u578b\u548c\u7279\u6b8a\u6570\u503c\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u548c\u5e94\u7528\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u68c0\u67e5\u4e00\u4e2a\u5b57\u7b26\u4e32\u662f\u5426\u53ef\u4ee5\u88ab\u8f6c\u6362\u4e3a\u6570\u5b57\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>str.isdigit()<\/code>\u65b9\u6cd5\u6765\u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u4e32\u662f\u5426\u53ea\u5305\u542b\u6570\u5b57\u5b57\u7b26\u3002\u4f8b\u5982\uff0c<code>&quot;123&quot;.isdigit()<\/code>\u4f1a\u8fd4\u56de<code>True<\/code>\uff0c\u800c<code>&quot;123.45&quot;.isdigit()<\/code>\u5219\u8fd4\u56de<code>False<\/code>\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\u7c7b\u578b\uff0c\u5982\u4f7f\u7528<code>float()<\/code>\u6216<code>int()<\/code>\uff0c\u5e76\u6355\u83b7\u5f02\u5e38\u6765\u5224\u65ad\u662f\u5426\u4e3a\u6709\u6548\u6570\u5b57\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5\u53ef\u4ee5\u5224\u65ad\u53d8\u91cf\u7c7b\u578b\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>isinstance()<\/code>\u51fd\u6570\u6765\u5224\u65ad\u4e00\u4e2a\u53d8\u91cf\u7684\u7c7b\u578b\u3002\u5bf9\u4e8e\u6570\u5b57\uff0c\u53ef\u4ee5\u4f7f\u7528<code>isinstance(variable, (int, float))<\/code>\u6765\u68c0\u67e5\u53d8\u91cf\u662f\u5426\u4e3a\u6574\u6570\u6216\u6d6e\u70b9\u6570\u3002\u6b64\u5916\uff0c<code>type()<\/code>\u51fd\u6570\u4e5f\u53ef\u4ee5\u7528\u6765\u83b7\u53d6\u53d8\u91cf\u7684\u7c7b\u578b\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\u4ee5\u5224\u65ad\u5176\u662f\u5426\u4e3a\u6570\u5b57\uff1f<\/strong><br \/>\u5bf9\u4e8e\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\uff0c\u9996\u5148\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u8fc7\u6ee4\u6389\u975e\u6570\u5b57\u5b57\u7b26\u3002\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u4e2d\u7684<code>re.sub()<\/code>\u51fd\u6570\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c<code>re.sub(r&#39;\\D&#39;, &#39;&#39;, your_string)<\/code>\u5c06\u79fb\u9664\u6240\u6709\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u4e4b\u540e\u518d\u4f7f\u7528<code>isdigit()<\/code>\u6216\u5c1d\u8bd5\u8f6c\u6362\u4e3a\u6570\u5b57\u6765\u5224\u65ad\u662f\u5426\u4e3a\u6709\u6548\u6570\u5b57\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5224\u65ad\u4e00\u4e2a\u503c\u662f\u5426\u4e3a\u6570\u5b57\uff0c\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\uff08\u5982isinstance()\u3001isdigit [&hellip;]","protected":false},"author":3,"featured_media":1082280,"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\/1082275"}],"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=1082275"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1082275\/revisions"}],"predecessor-version":[{"id":1082282,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1082275\/revisions\/1082282"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1082280"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1082275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1082275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1082275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}