{"id":5522,"date":"2018-07-07T20:46:55","date_gmt":"2018-07-07T11:46:55","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=5522"},"modified":"2023-05-27T21:01:22","modified_gmt":"2023-05-27T12:01:22","slug":"%e3%80%90javascript%e3%80%91%e9%9d%9e%e5%90%8c%e6%9c%9f%e5%87%a6%e7%90%86%e3%82%92%e7%b0%a1%e5%8d%98%e3%81%ab%e3%81%97%e3%80%81%e3%82%b3%e3%83%bc%e3%83%ab%e3%83%90%e3%83%83%e3%82%af%e5%9c%b0%e7%8d%84","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=5522","title":{"rendered":"\u3010JavaScript\u3011\u975e\u540c\u671f\u51e6\u7406\u3092\u7c21\u5358\u306b\u3057\u3001\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u5730\u7344\u304b\u3089\u8131\u51fa\u3055\u305b\u308b\u300cPromise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u300d\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u5229\u7528\u3059\u308b\u3068\u3001\u4f55\u5ea6\u3082\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u304c\u547c\u3070\u308c\u3066\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5165\u308c\u5b50\u69cb\u9020\u304c\u8907\u96d1\u306b\u306a\u308b\u3068\u3044\u3046<span style=\"color: #ff0000;\"><strong>\u300c\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u5730\u7344\u300d<\/strong><\/span>\u3068\u3044\u3046\u554f\u984c\u304c\u767a\u751f\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u306e\u304c\u3001\u300cECMAScript2015\u300d\u3067\u63a1\u7528\u3055\u308c\u305f<span style=\"color: #ff0000;\"><strong>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3068\u3044\u3046\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<\/p>\n<h2>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7279\u5fb4<\/h2>\n<ul>\n<li><span style=\"color: #ff0000;\"><strong>\u975e\u540c\u671f\u51e6\u7406\u3092\u76e3\u8996<\/strong><\/span>\u3059\u308b\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<\/li>\n<li><span style=\"color: #ff0000;\"><strong>\u300c\u30d6\u30e9\u30a6\u30b6\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u300d\u3067\u306f\u306a\u304f\u3001\u300cJavaScript\u6a19\u6e96\u306e\u7d44\u307f\u8fbc\u307f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u300d<\/strong><\/span>\u3067\u3042\u308b\u3002<\/li>\n<\/ul>\n<h2>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u4f7f\u7528\u306e\u6d41\u308c<\/h2>\n<h3>1.Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\u95a2\u6570\u3092\u4f5c\u308b\u65b9\u6cd5<\/h3>\n<p>\u975e\u540c\u671f\u51e6\u7406\u306e\u5bfe\u8c61\u3068\u306a\u308b\u95a2\u6570\u3067<span style=\"color: #ff0000;\"><strong>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059<\/strong><\/span>\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u305d\u306e\u969b\u306b<span style=\"color: #ff0000;\"><strong>Promise\u30af\u30e9\u30b9\u306e\u4e2d\u3067\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570(function(resoleve)\u301c)\u3092\u5b9a\u7fa9\u3059\u308b<\/strong><\/span>\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">function \u95a2\u6570(){\r\n return new Promise(){\r\n  \/\/\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\r\n  function(resolve){\r\n  }\r\n }.then(\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570);\r\n}<\/pre>\n<p>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u3001\u4e0b\u8a182\u3064\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u5f15\u6570<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>resolve<\/td>\n<td>\u7b2c\u4e00\u5f15\u6570\u3068\u3057\u3066\u53d6\u308a\u3001\u6307\u5b9a\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u5fc5\u9808<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002\u51e6\u7406\u7d50\u679c\u304c\u6b63\u5e38\u3060\u3063\u305f\u5834\u5408\u306b\u3001<span style=\"color: #ff0000;\"><strong>\u300cthen\u300d\u306b\u3088\u3063\u3066\u8a2d\u5b9a\u3057\u305f\u6b21\u306e\u95a2\u6570\u3092\u547c\u3073\u307e\u3059\u3002\u3053\u308c\u3082Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td>reject<\/td>\n<td>\u4efb\u610f\u3067\u3059\u3002\u51e6\u7406\u7d50\u679c\u304c\u7570\u5e38\u3060\u3063\u305f\u5834\u5408\u306b\u5b9f\u884c\u3055\u305b\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>then\u30e1\u30bd\u30c3\u30c9<\/h4>\n<p>resolve\u30e1\u30bd\u30c3\u30c9\u3092\u8aad\u3093\u3060\u969b\u306b\u3001\u3053\u306ethen\u3067\u8a2d\u5b9a\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u307e\u3059\u3002resolve\u30e1\u30bd\u30c3\u30c9\u306e\u7b2c\u4e00\u5f15\u6570\u304c\u3001\u6b21\u306bthen\u3067\u547c\u3076\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u7528\u9014<\/h3>\n<p>\u9806\u756a\u306b\u975e\u540c\u671f\u51e6\u7406\u3092\u5b9f\u884c\u3057\u305f\u3044\u304b\u3064\u3001\u524d\u306e\u51e6\u7406\u306e\u51e6\u7406\u7d50\u679c\u3092\u6b21\u306e\u51e6\u7406\u306b\u4f7f\u3044\u305f\u3044\u5834\u5408\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<h4>\u5b9f\u88c5\u4f8b<\/h4>\n<pre class=\"lang:default decode:true \">function task1(){\r\n\treturn new Promise(function (resolve, reject) {\r\n\t  console.log('test')\r\n        \/\/\u5f15\u6570\u3068\u3057\u3066\u6e21\u3055\u308c\u305f\u300ctask1\u300d\u3092\u6b21\u306ethen\u30e1\u30bd\u30c3\u30c9\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u5185\u306e\u7b2c\u4e00\u5f15\u6570(result1)\u3068\u3057\u3066\u6e21\u3059\u3002\r\n\t  resolve('task1');\r\n\t}).then((result1) =&gt; {\r\n\t  console.log(result1)\r\n\t});\r\n}\r\n\r\ntask1();<\/pre>\n<p>Promise\u306e\u4e2d\u306e\u51e6\u7406\u7d50\u679c\u3092resolve\u306b\u3088\u3063\u3066then\u306b\u6e21\u3057\u3066\u3044\u307e\u3059\u3002\u9006\u306bPromise\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u306e\u4e2d\u306bresolve\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f<span style=\"color: #ff0000;\"><strong>\u6b21\u306ethen\u3092\u547c\u3076\u4e8b\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u4f8b\u3048resolve\u306b\u6e21\u3059\u5f15\u6570\u304c\u306a\u304b\u3063\u305f\u3068\u3057\u3066\u3082\u5fc5\u305aresolve\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/strong><\/span><\/p>\n<h3>2.\u95a2\u6570\u540c\u58eb\u3092\u3064\u306a\u3050\u65b9\u6cd5\uff08\u30e1\u30bd\u30c3\u30c9\u30c1\u30a7\u30fc\u30f3\uff09<\/h3>\n<pre class=\"lang:default decode:true\">\u95a2\u65701.then(\u6210\u529f\u6642\u306b\u547c\u3076\u95a2\u65702,\u5931\u6557\u6642\u306b\u547c\u3076\u95a2\u65702).then(\u6210\u529f\u6642\u306b\u547c\u3076\u95a2\u65703,);<\/pre>\n<p>\u666e\u901a\u306e<span style=\"color: #ff0000;\"><strong>\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u306e\u5165\u308c\u5b50\u306b\u6bd4\u3079\u3066\u975e\u5e38\u306b\u8aad\u307f\u3084\u3059\u3044<\/strong><\/span>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u5143\u3005\u3001jQuery\u3084\u3001AngularJS\u3068\u3044\u3063\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u3053\u306e\u3088\u3046\u306a\u6a5f\u80fd\u304c\u4ed8\u5c5e\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u304c\u3001ECMAScript2015\u3088\u308a\u3001\u6a19\u6e96\u306eJavaScript\u3067\u3082\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3059\u3002<\/p>\n<h4>then\u30e1\u30bd\u30c3\u30c9<\/h4>\n<p>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u306e\u7d50\u679c\u3092\u53d7\u3051\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<h4>\u7528\u9014<\/h4>\n<p>\u3044\u3061\u3044\u3061\u3001\u975e\u540c\u671f\u51e6\u7406\u7528\u306e\u95a2\u6570\u3092\u5ba3\u8a00\u3057\u306a\u304f\u3066\u3082\u3001\u95a2\u6570\u306e\u4e2d\u3067\u975e\u540c\u671f\u51e6\u7406\u3092\u547c\u3079\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<h4>\u5b9f\u88c5\u4f8b<\/h4>\n<pre class=\"lang:default decode:true \">new Promise(function(resolve){\r\n\tconsole.log('test')\r\n    resolve();\r\n}).then(function(resolve){\r\n\tconsole.log('test2')\r\n})<\/pre>\n<h4>\u5b9f\u88c5\u4f8b2<\/h4>\n<p>\u6210\u529f\u6642\u306e\u51e6\u7406\u3068\u3001\u5931\u6557\u6642\u306e\u51e6\u7406\u3067\u5206\u5c90\u3055\u305b\u308b\u4f8b\u3067\u3059\u3002\u306a\u304a\u3001Promise\u30af\u30e9\u30b9\u5185\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3067\u6b21\u306ethen\u306e\u5f15\u6570\u306b\u3059\u308b\u5834\u5408\u306f<span style=\"color: #ff0000;\"><strong>resolve\u306e\u7b2c\u4e00\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u4ed5\u69d8<\/strong><\/span>\u3067\u3057\u305f\u304c\u3001<span style=\"color: #ff0000;\"><strong>then\u30e1\u30bd\u30c3\u30c9\u304b\u3089then\u30e1\u30bd\u30c3\u30c9\u306b\u5f15\u6570\u3092\u6e21\u3059\u5834\u5408\u306freturn\u3067\u6e21\u3059\u4e8b\u306b\u306a\u308b<\/strong><\/span>\u306e\u3067\u6ce8\u610f\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">new Promise(function(resolve){\r\n\tconsole.log('test')\r\n    resolve('\u623b\u308a\u5024');\r\n}).then(function(resolve\u304b\u3089\u306e\u5f15\u6570){\r\n\tconsole.log('\u6210\u529f\u6642')\r\n        return \u623b\u308a\u5024;\r\n},function(then\u304b\u3089\u306e\u5f15\u6570){\r\n\tconsole.log('\u5931\u6557\u6642') \r\n        return \u623b\u308a\u5024;\r\n}).then(function(then\u304b\u3089\u306e\u5f15\u6570){\r\n\tconsole.log('\u6210\u529f\u66422')\r\n},function(){\r\n\tconsole.log('\u5931\u6557\u66422')\r\n})<\/pre>\n<h4>\u5b9f\u88c5\u4f8b3<\/h4>\n<p>\u306a\u304a\u3001<span style=\"color: #ff0000;\"><strong>then\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u306e\u4e2d\u3067Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6539\u3081\u3066\u8fd4\u3057\u305f\u3068\u3057\u3066\u3082\u540c\u3058\u6319\u52d5\u306b\u306a\u308a\u307e\u3059\u3002<\/strong><\/span><\/p>\n<pre class=\"lang:default decode:true \">hidouki().then(text =&gt; {\r\n  \/\/  console.log(\"\u3042\");\r\n  console.log(text);\r\n  return \"\u304b\u304d\u304f\u3051\u3053\"\r\n}).then(text =&gt; {\r\n  return new Promise(resolve =&gt; {\r\n    setTimeout(() =&gt; {\r\n      resolve(\"\u305f\u3061\u3064\u3066\u3068\")\r\n    }, 100)\r\n  });\r\n}).then(a =&gt; {\r\n  console.log(a); \/\/\u305f\u3061\u3064\u3066\u3068\r\n});<\/pre>\n<h2>Promise.all<\/h2>\n<p>\u4e0a\u8a18then\u3092\u3064\u306a\u3052\u308b\u4f8b\u3067\u3082\u5c11\u3057\u5197\u9577\u306b\u898b\u3048\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3059\u3063\u304d\u308a\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002\u6700\u7d42\u7684\u306a\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u306e\u9023\u7d9a\u306e\u7d50\u679c\u306fthen\u3067\u53d7\u3051\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">Promise.all([]\r\n  \u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u65701,\r\n  \u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u65702\r\n])\r\n\/\/\u51e6\u7406\u7d50\u679c\r\n.then((([\u5f15\u6570]) =&gt;{\r\n});<\/pre>\n<h2>catch\u30e1\u30bd\u30c3\u30c9<\/h2>\n<p>catch\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068<span style=\"color: #ff0000;\"><strong>reject\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092\u6355\u307e\u3048\u308b\u4e8b\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">function hidouki() {\r\n  return new Promise((resolve, reject) =&gt; {\r\n    setTimeout(() =&gt; {\r\n      reject(\"\u30a8\u30e9\u30fc\u767a\u751f\");\r\n    }, 100);\r\n  });\r\n}\r\nhidouki().then(text =&gt; {\r\n  console.log(text);\r\n})\r\n.catch(error =&gt; {\r\n  console.log(error);\r\n});<\/pre>\n<h4>Exception\u3067\u3082\u547c\u3076\u4e8b\u304c\u53ef\u80fd<\/h4>\n<pre class=\"lang:default decode:true\">function hidouki() {\r\n  return new Promise((resolve, reject) =&gt; {\r\n    throw new Exception(\"\u30a8\u30e9\u30fc\u767a\u751f\");\r\n  });\r\n}\r\nhidouki().then(text =&gt; {\r\n  console.log(text);\r\n})\r\n  .catch(error =&gt; {\r\n    console.log(error);  \/\/ReferenceError: Exception is not defined\r\n    return \"finally\u306b\u6e21\u3059\";\r\n  })<\/pre>\n<h4>finally<\/h4>\n<p>catch\u306e\u5f8c\u306bthen\u3092\u3064\u306a\u3052\u3070<span style=\"color: #ff0000;\"><strong>Java\u306etry \u301c catch\u3067\u3044\u3046finally\u3068\u540c\u3058\u5f79\u5272\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b\u4e8b\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002catch\u30e1\u30bd\u30c3\u30c9\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u5185\u3067<span style=\"color: #ff0000;\"><strong>return\u6587\u3092\u4f7f\u3046\u4e8b\u3067finally\u306b\u5f15\u6570\u3092\u6e21\u3059\u4e8b\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">function hidouki() {\r\n  return new Promise((resolve, reject) =&gt; {\r\n    setTimeout(() =&gt; {\r\n      reject(\"\u30a8\u30e9\u30fc\u767a\u751f\");\r\n    }, 100);\r\n  });\r\n}\r\nhidouki().then(text =&gt; {\r\n  console.log(text);\r\n})\r\n  .catch(error =&gt; {\r\n    console.log(error);\r\n    return \"Finally\u306b\u6e21\u3059\";\r\n  }).then(text =&gt; {\r\n    console.log(\"Finally\"); \r\n    console.log(text);       \/\/Finally\u306b\u6e21\u3059\r\n  });<\/pre>\n<h2>\u9759\u7684\u306aresolve\u30e1\u30bd\u30c3\u30c9<\/h2>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5358\u7d14\u306bPromise\u304b\u3089then\u306b\u5bfe\u3057\u3066\u5f15\u6570\u3092\u6e21\u3059\u3060\u3051\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u5834\u5408\u306f\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306eresolve\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u697d\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">function hidouki() {\r\n  return new Promise((resolve, reject) =&gt; {\r\n    resolve(\"\u6e21\u3059\");\r\n  });\r\n}\r\nhidouki().then(text =&gt; {\r\n  console.log(text);\r\n})<\/pre>\n<p>Promise\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u306a\u308b\u306e\u3067<span style=\"color: #ff0000;\"><strong>new\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<pre class=\"lang:default decode:true  \">function hidouki() {\r\n  return Promise.resolve(\"\u6e21\u3059\");\r\n};\r\nhidouki().then(text =&gt; {\r\n  console.log(text); \/\/\u6e21\u3059\r\n})<\/pre>\n","protected":false},"excerpt":{"rendered":"\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u5229\u7528\u3059\u308b\u3068\u3001\u4f55\u5ea6\u3082\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u304c\u547c\u3070\u308c\u3066\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5165\u308c\u5b50\u69cb\u9020\u304c\u8907\u96d1\u306b\u306a\u308b\u3068\u3044\u3046\u300c\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u5730\u7344\u300d\u3068\u3044\u3046\u554f\u984c\u304c\u767a\u751f\u3057\u3066\u304d\u307e\u3057\u305f\u3002 \u305d\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u306e\u304c\u3001\u300cECMAScript2015\u300d\u3067\u63a1\u7528 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5522"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5522"}],"version-history":[{"count":27,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5522\/revisions"}],"predecessor-version":[{"id":20300,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5522\/revisions\/20300"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5522"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}