{"id":245,"date":"2024-12-14T13:55:08","date_gmt":"2024-12-14T05:55:08","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=245"},"modified":"2024-12-14T13:55:08","modified_gmt":"2024-12-14T05:55:08","slug":"%e5%a6%82%e4%bd%95%e5%b0%86%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%98%a0%e5%b0%84%e5%88%b0-go-json-%e5%af%b9%e8%b1%a1%e4%b8%ad%e7%9a%84%e4%b8%8d%e5%90%8c%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2024\/12\/14\/%e5%a6%82%e4%bd%95%e5%b0%86%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%98%a0%e5%b0%84%e5%88%b0-go-json-%e5%af%b9%e8%b1%a1%e4%b8%ad%e7%9a%84%e4%b8%8d%e5%90%8c%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b\/","title":{"rendered":"\u5982\u4f55\u5c06\u5b57\u7b26\u4e32\u6620\u5c04\u5230 Go JSON \u5bf9\u8c61\u4e2d\u7684\u4e0d\u540c\u6570\u636e\u7c7b\u578b"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u5728 Go \u8bed\u8a00\u4e2d\uff0c\u5904\u7406 JSON \u6570\u636e\u662f\u975e\u5e38\u5e38\u89c1\u7684\u9700\u6c42\u3002Go \u63d0\u4f9b\u4e86\u5f3a\u5927\u7684 JSON \u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u673a\u5236\uff0c\u4f7f\u5f97\u5c06\u5b57\u7b26\u4e32\u6620\u5c04\u5230 Go JSON \u5bf9\u8c61\u4e2d\u7684\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u53d8\u5f97\u7b80\u5355\u800c\u9ad8\u6548\u3002\u7136\u800c\uff0c\u7531\u4e8e Go \u662f\u9759\u6001\u7c7b\u578b\u8bed\u8a00\uff0c\u5904\u7406 JSON \u6570\u636e\u65f6\u9700\u8981\u7279\u522b\u6ce8\u610f\u6570\u636e\u7c7b\u578b\u7684\u8f6c\u6362\u548c\u6620\u5c04\u3002<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5c06\u5b57\u7b26\u4e32\u6620\u5c04\u5230 Go JSON \u5bf9\u8c61\u4e2d\u7684\u5404\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u5305\u62ec\u7ed3\u6784\u4f53\u3001\u6570\u7ec4\u3001\u5b57\u5178\u7b49\u3002<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e00\u3001Go \u4e2d\u7684 JSON \u7f16\u89e3\u7801\u57fa\u7840<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 Go \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>encoding\/json<\/code> \u5305\u6765\u5904\u7406 JSON \u6570\u636e\u3002\u4e3b\u8981\u901a\u8fc7\u4ee5\u4e0b\u4e24\u4e2a\u51fd\u6570\u6765\u8fdb\u884c\u7f16\u7801\u548c\u89e3\u7801\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>json.Unmarshal()<\/code><\/strong>\uff1a\u5c06 JSON \u5b57\u7b26\u4e32\u89e3\u7801\u4e3a Go \u53d8\u91cf\uff08\u5982\u7ed3\u6784\u4f53\u3001\u6570\u7ec4\u3001map \u7b49\uff09\u3002<\/li>\n\n\n\n<li><strong><code>json.Marshal()<\/code><\/strong>\uff1a\u5c06 Go \u6570\u636e\u7c7b\u578b\uff08\u5982\u7ed3\u6784\u4f53\u3001\u6570\u7ec4\u7b49\uff09\u7f16\u7801\u4e3a JSON \u5b57\u7b26\u4e32\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e8c\u3001\u5c06 JSON \u5b57\u7b26\u4e32\u6620\u5c04\u5230 Go \u53d8\u91cf<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a JSON \u5b57\u7b26\u4e32\uff0c\u6211\u4eec\u5e0c\u671b\u5c06\u5176\u89e3\u6790\u5e76\u6620\u5c04\u5230 Go \u4e2d\u7684\u53d8\u91cf\u3002\u4e0b\u9762\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u57fa\u672c\u793a\u4f8b\uff1a\u6620\u5c04\u5230\u7b80\u5355\u7c7b\u578b<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"encoding\/json\"\n    \"fmt\"\n)\n\nfunc main() {\n    \/\/ JSON \u5b57\u7b26\u4e32\n    jsonStr := `{\"name\": \"Alice\", \"age\": 25, \"isStudent\": false}`\n\n    \/\/ \u5b9a\u4e49\u4e00\u4e2a map \u7c7b\u578b\u6765\u63a5\u6536\u89e3\u6790\u7684 JSON\n    var obj map&#91;string]interface{}\n\n    \/\/ \u5c06 JSON \u5b57\u7b26\u4e32\u89e3\u6790\u5230 map \u4e2d\n    if err := json.Unmarshal(&#91;]byte(jsonStr), &amp;obj); err != nil {\n        fmt.Println(\"Error unmarshaling:\", err)\n        return\n    }\n\n    \/\/ \u8f93\u51fa\u89e3\u6790\u7ed3\u679c\n    fmt.Println(\"Name:\", obj&#91;\"name\"])\n    fmt.Println(\"Age:\", obj&#91;\"age\"])\n    fmt.Println(\"Is Student:\", obj&#91;\"isStudent\"])\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7 <code>json.Unmarshal()<\/code> \u5c06 JSON \u5b57\u7b26\u4e32\u89e3\u6790\u5230\u4e00\u4e2a <code>map[string]interface{}<\/code> \u7c7b\u578b\u7684\u53d8\u91cf\u4e2d\u3002\u8fd9\u6837\u53ef\u4ee5\u8f7b\u677e\u5730\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u503c\uff08\u5982\u5b57\u7b26\u4e32\u3001\u6574\u6570\u548c\u5e03\u5c14\u503c\uff09\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u6ce8\u610f<\/strong>\uff1a<code>map[string]interface{}<\/code> \u4e2d\u7684 <code>interface{}<\/code> \u7c7b\u578b\u5141\u8bb8\u5b58\u50a8\u4efb\u610f\u7c7b\u578b\u7684\u6570\u636e\uff0c\u56e0\u6b64\u4f60\u53ef\u4ee5\u5b58\u50a8\u5b57\u7b26\u4e32\u3001\u6574\u6570\u3001\u5e03\u5c14\u503c\u6216\u5176\u4ed6\u4efb\u4f55\u7c7b\u578b\u3002<\/h4>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e09\u3001\u5c06 JSON \u5b57\u7b26\u4e32\u6620\u5c04\u5230\u7ed3\u6784\u4f53<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u5e38\uff0cGo \u8bed\u8a00\u4e2d\u5904\u7406 JSON \u6570\u636e\u7684\u63a8\u8350\u65b9\u5f0f\u662f\u5c06 JSON \u6620\u5c04\u5230\u7ed3\u6784\u4f53\u4e0a\u3002\u8fd9\u662f\u56e0\u4e3a\u7ed3\u6784\u4f53\u63d0\u4f9b\u4e86\u660e\u786e\u7684\u5b57\u6bb5\u7c7b\u578b\uff0c\u4fbf\u4e8e\u8fdb\u884c\u7c7b\u578b\u5b89\u5168\u7684\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u793a\u4f8b\uff1a\u6620\u5c04\u5230\u7ed3\u6784\u4f53<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"encoding\/json\"\n    \"fmt\"\n)\n\ntype Person struct {\n    Name     string `json:\"name\"`\n    Age      int    `json:\"age\"`\n    IsStudent bool  `json:\"isStudent\"`\n}\n\nfunc main() {\n    \/\/ JSON \u5b57\u7b26\u4e32\n    jsonStr := `{\"name\": \"Bob\", \"age\": 30, \"isStudent\": true}`\n\n    \/\/ \u521b\u5efa\u4e00\u4e2a Person \u7c7b\u578b\u7684\u53d8\u91cf\u6765\u63a5\u6536\u89e3\u6790\u7ed3\u679c\n    var person Person\n\n    \/\/ \u5c06 JSON \u5b57\u7b26\u4e32\u89e3\u6790\u5230 Person \u7ed3\u6784\u4f53\n    if err := json.Unmarshal(&#91;]byte(jsonStr), &amp;person); err != nil {\n        fmt.Println(\"Error unmarshaling:\", err)\n        return\n    }\n\n    \/\/ \u8f93\u51fa\u89e3\u6790\u7ed3\u679c\n    fmt.Println(\"Name:\", person.Name)\n    fmt.Println(\"Age:\", person.Age)\n    fmt.Println(\"Is Student:\", person.IsStudent)\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a <code>Person<\/code> \u7ed3\u6784\u4f53\uff0c\u5e76\u4e14\u901a\u8fc7 JSON \u6807\u7b7e (<code>json:\"field_name\"<\/code>) \u6765\u786e\u4fdd JSON \u5b57\u6bb5\u6b63\u786e\u6620\u5c04\u5230\u7ed3\u6784\u4f53\u5b57\u6bb5\u3002\u5982\u679c JSON \u5b57\u6bb5\u540d\u4e0e\u7ed3\u6784\u4f53\u5b57\u6bb5\u540d\u4e0d\u540c\uff0c\u53ef\u4ee5\u901a\u8fc7\u6807\u7b7e\u6307\u5b9a\u6620\u5c04\u5173\u7cfb\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>JSON \u6807\u7b7e<\/strong>\uff1a<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u7ed3\u6784\u4f53\u4e2d\u7684\u5b57\u6bb5\u53ef\u4ee5\u901a\u8fc7 <code>json<\/code> \u6807\u7b7e\u4e0e JSON \u6570\u636e\u7684\u5b57\u6bb5\u540d\u79f0\u8fdb\u884c\u7ed1\u5b9a\u3002\u5728 <code>json.Unmarshal()<\/code> \u65f6\uff0c\u5b57\u6bb5\u7684\u540d\u79f0\u548c\u6807\u7b7e\u4f1a\u88ab\u7528\u6765\u81ea\u52a8\u6620\u5c04\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u56db\u3001\u5c06 JSON \u5b57\u7b26\u4e32\u6620\u5c04\u5230\u6570\u7ec4\u6216\u5207\u7247<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c JSON \u6570\u636e\u5305\u542b\u4e00\u4e2a\u6570\u7ec4\uff0c\u4f60\u53ef\u4ee5\u5c06\u5176\u6620\u5c04\u5230 Go \u7684\u6570\u7ec4\u6216\u5207\u7247\u7c7b\u578b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u793a\u4f8b\uff1a\u6620\u5c04\u5230\u5207\u7247<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"encoding\/json\"\n    \"fmt\"\n)\n\nfunc main() {\n    \/\/ JSON \u5b57\u7b26\u4e32\n    jsonStr := `&#91;\"apple\", \"banana\", \"cherry\"]`\n\n    \/\/ \u5b9a\u4e49\u4e00\u4e2a\u5207\u7247\u53d8\u91cf\u6765\u63a5\u6536\u89e3\u6790\u7ed3\u679c\n    var fruits &#91;]string\n\n    \/\/ \u5c06 JSON \u5b57\u7b26\u4e32\u89e3\u6790\u5230\u5207\u7247\n    if err := json.Unmarshal(&#91;]byte(jsonStr), &amp;fruits); err != nil {\n        fmt.Println(\"Error unmarshaling:\", err)\n        return\n    }\n\n    \/\/ \u8f93\u51fa\u89e3\u6790\u7ed3\u679c\n    fmt.Println(\"Fruits:\", fruits)\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5c06\u4e00\u4e2a JSON \u6570\u7ec4\uff08<code>[\"apple\", \"banana\", \"cherry\"]<\/code>\uff09\u89e3\u6790\u5230\u4e00\u4e2a Go \u5207\u7247 <code>[]string<\/code> \u7c7b\u578b\u7684\u53d8\u91cf\u4e2d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e94\u3001\u5c06 JSON \u5b57\u7b26\u4e32\u6620\u5c04\u5230\u5b57\u5178\uff08map\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">JSON \u6570\u636e\u7684\u952e\u503c\u5bf9\u53ef\u4ee5\u76f4\u63a5\u6620\u5c04\u5230 Go \u7684 <code>map<\/code> \u7c7b\u578b\u3002<code>map<\/code> \u662f\u4e00\u4e2a\u952e\u503c\u5bf9\u96c6\u5408\uff0c\u5b83\u5141\u8bb8\u6839\u636e\u952e\u8bbf\u95ee\u76f8\u5e94\u7684\u503c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u793a\u4f8b\uff1a\u6620\u5c04\u5230\u5b57\u5178\uff08map\uff09<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"encoding\/json\"\n    \"fmt\"\n)\n\nfunc main() {\n    \/\/ JSON \u5b57\u7b26\u4e32\n    jsonStr := `{\"name\": \"Charlie\", \"age\": 40, \"isEmployed\": true}`\n\n    \/\/ \u5b9a\u4e49\u4e00\u4e2a map \u7c7b\u578b\u6765\u63a5\u6536\u89e3\u6790\u7684 JSON\n    var details map&#91;string]interface{}\n\n    \/\/ \u5c06 JSON \u5b57\u7b26\u4e32\u89e3\u6790\u5230 map \u4e2d\n    if err := json.Unmarshal(&#91;]byte(jsonStr), &amp;details); err != nil {\n        fmt.Println(\"Error unmarshaling:\", err)\n        return\n    }\n\n    \/\/ \u8f93\u51fa\u89e3\u6790\u7ed3\u679c\n    fmt.Println(\"Name:\", details&#91;\"name\"])\n    fmt.Println(\"Age:\", details&#91;\"age\"])\n    fmt.Println(\"Is Employed:\", details&#91;\"isEmployed\"])\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5c06 JSON \u6570\u636e\u89e3\u6790\u5230 <code>map[string]interface{}<\/code> \u4e2d\u3002\u6bcf\u4e2a\u952e\uff08\u4f8b\u5982 <code>\"name\"<\/code>, <code>\"age\"<\/code> \u7b49\uff09\u90fd\u6620\u5c04\u5230\u4e00\u4e2a\u503c\uff0c\u8fd9\u4e9b\u503c\u7684\u7c7b\u578b\u662f <code>interface{}<\/code>\uff0c\u53ef\u4ee5\u5b58\u50a8\u4efb\u4f55\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u516d\u3001\u5904\u7406 JSON \u4e2d\u7684\u7a7a\u503c\u548c\u7f3a\u5931\u5b57\u6bb5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 JSON \u6570\u636e\u4e2d\uff0c\u6709\u65f6\u5b57\u6bb5\u53ef\u80fd\u4f1a\u7f3a\u5931\uff0c\u6216\u8005\u5b57\u6bb5\u7684\u503c\u4e3a <code>null<\/code>\u3002Go \u7684 <code>encoding\/json<\/code> \u5e93\u4f1a\u81ea\u52a8\u5904\u7406\u8fd9\u4e9b\u60c5\u51b5\uff0c\u4f46\u6211\u4eec\u9700\u8981\u7279\u522b\u6ce8\u610f\u5982\u4f55\u8bbe\u8ba1\u7ed3\u6784\u4f53\u548c\u7c7b\u578b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u793a\u4f8b\uff1a\u5904\u7406\u7f3a\u5931\u5b57\u6bb5\u548c\u7a7a\u503c<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"encoding\/json\"\n    \"fmt\"\n)\n\ntype Product struct {\n    Name     string  `json:\"name\"`\n    Price    float64 `json:\"price\"`\n    Discount *float64 `json:\"discount\"`  \/\/ \u4f7f\u7528\u6307\u9488\u6765\u5904\u7406\u7a7a\u503c\n}\n\nfunc main() {\n    \/\/ JSON \u5b57\u7b26\u4e32\uff0c\u6ce8\u610f \"discount\" \u5b57\u6bb5\u7f3a\u5931\n    jsonStr := `{\"name\": \"Laptop\", \"price\": 1000.0}`\n\n    var product Product\n    if err := json.Unmarshal(&#91;]byte(jsonStr), &amp;product); err != nil {\n        fmt.Println(\"Error unmarshaling:\", err)\n        return\n    }\n\n    \/\/ \u8f93\u51fa\u89e3\u6790\u7ed3\u679c\n    fmt.Println(\"Name:\", product.Name)\n    fmt.Println(\"Price:\", product.Price)\n\n    \/\/ \u5904\u7406 discount \u5b57\u6bb5\u4e3a nil \u7684\u60c5\u51b5\n    if product.Discount != nil {\n        fmt.Println(\"Discount:\", *product.Discount)\n    } else {\n        fmt.Println(\"Discount: not available\")\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>discount<\/code> \u5b57\u6bb5\u7f3a\u5931\u65f6\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u4e00\u4e2a\u6307\u9488\u7c7b\u578b\uff08<code>*float64<\/code>\uff09\uff0c\u8fd9\u4f7f\u5f97 <code>discount<\/code> \u5b57\u6bb5\u53ef\u4ee5\u4e3a <code>nil<\/code>\uff0c\u4ece\u800c\u5904\u7406 JSON \u6570\u636e\u4e2d\u7f3a\u5931\u5b57\u6bb5\u7684\u60c5\u51b5\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e03\u3001\u603b\u7ed3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 Go \u4e2d\uff0c\u5c06\u5b57\u7b26\u4e32\u6620\u5c04\u5230 JSON \u5bf9\u8c61\u4e2d\u7684\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u901a\u5e38\u4f7f\u7528 <code>json.Unmarshal()<\/code> \u51fd\u6570\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u7ed3\u6784\u4f53\u3001\u5207\u7247\u3001map \u548c\u6307\u9488\u7b49\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u4ee5\u5c06 JSON \u6570\u636e\u9ad8\u6548\u5730\u6620\u5c04\u5230 Go \u4e2d\uff0c\u5e76\u8fdb\u884c\u7075\u6d3b\u5904\u7406\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u8981\u6839\u636e JSON \u6570\u636e\u7684\u683c\u5f0f\u548c\u9700\u6c42\uff0c\u9009\u62e9\u9002\u5f53\u7684\u6570\u636e\u7ed3\u6784\uff0c\u5e76\u786e\u4fdd\u5bf9\u7f3a\u5931\u5b57\u6bb5\u548c\u7a7a\u503c\u8fdb\u884c\u6709\u6548\u7684\u5904\u7406\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u591a\u4fe1\u606f\u8bf7\u5173\u6ce8\u5176\u4ed6\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Go \u8bed\u8a00\u4e2d\uff0c\u5904\u7406 JSON \u6570\u636e\u662f\u975e\u5e38\u5e38\u89c1\u7684\u9700\u6c42\u3002Go \u63d0\u4f9b\u4e86\u5f3a\u5927\u7684 JSON \u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u673a\u5236\uff0c\u4f7f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-golang"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}