{"id":1610,"date":"2025-05-18T12:11:14","date_gmt":"2025-05-18T03:11:14","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1610"},"modified":"2025-09-18T12:11:25","modified_gmt":"2025-09-18T03:11:25","slug":"json%e5%ae%8c%e5%85%a8%e3%82%ac%e3%82%a4%e3%83%89%ef%bd%9c%e5%9f%ba%e7%a4%8e%e3%81%8b%e3%82%89api%e9%80%a3%e6%90%ba%e3%83%bb%e8%a8%ad%e8%a8%88%e5%8e%9f%e5%89%87%e3%83%bb%e3%82%a8%e3%83%a9%e3%83%bc","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1610\/","title":{"rendered":"JSON\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u57fa\u790e\u304b\u3089API\u9023\u643a\u30fb\u8a2d\u8a08\u539f\u5247\u30fb\u30a8\u30e9\u30fc\u89e3\u6c7a\u307e\u3067"},"content":{"rendered":"<div>\n<h2>3\u5206\u3067\u308f\u304b\u308bJSON\u3068\u306f\uff1fWeb\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u77e5\u308b\u3079\u304d\u57fa\u672c\u3068API\u9023\u643a\u306e\u5168\u77e5\u8b58<\/h2>\n<p>API\u9023\u643a\u3067\u3001\u300c\u306a\u305c\u304b\u52d5\u304b\u306a\u3044\u2026\u300d\u305d\u3093\u306a\u7d4c\u9a13\u3001\u3042\u308a\u307e\u305b\u3093\u304b\uff1fWeb\u958b\u767a\u306b\u6b20\u304b\u305b\u306a\u3044<strong>JSON<\/strong>\u306f\u3001\u305d\u306e\u30b7\u30f3\u30d7\u30eb\u3055\u3086\u3048\u306b\u3001\u6b63\u3057\u3044\u4f7f\u3044\u65b9\u3092\u6df1\u304f\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u3068\u4e88\u671f\u305b\u306c\u30a8\u30e9\u30fc\u3092\u62db\u304f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\n    \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u305d\u3093\u306a\u65e5\u3005\u306e\u958b\u767a\u3067\u76f4\u9762\u3059\u308b\u3067\u3042\u308d\u3046\u3001<strong>JSON<\/strong>\u306e\u57fa\u790e\u77e5\u8b58\u304b\u3089\u5177\u4f53\u7684\u306a\u89e3\u6c7a\u7b56\u307e\u3067\u3001\u79c1\u305f\u3061\u958b\u767a\u8005\u4ef2\u9593\u304c\u77e5\u3063\u3066\u304a\u304f\u3079\u304d\u30dd\u30a4\u30f3\u30c8\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\u7279\u306b\u3001\u30a8\u30e9\u30fc\u89e3\u6c7a\u65b9\u6cd5\u3084<strong>TypeScript<\/strong>\u30fb<strong>Java<\/strong>\u3067\u306e\u6b63\u3057\u3044\u578b\u5b9a\u7fa9\u3001\u305d\u3057\u3066\u4fdd\u5b88\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u306e\u8a2d\u8a08\u539f\u5247\u306b\u7126\u70b9\u3092\u5f53\u3066\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u901a\u3058\u3066\u3001<strong>JSON<\/strong>\u3092\u6271\u3046\u81ea\u4fe1\u3092\u3064\u3051\u3001\u3088\u308a\u30b9\u30e0\u30fc\u30ba\u306a\u958b\u767a\u3092\u76ee\u6307\u3057\u307e\u3057\u3087\u3046\u3002\n  <\/p>\n<hr \/>\n<h2>JSON\u3068\u306f\uff1f\u300c\u30c7\u30fc\u30bf\u4ea4\u63db\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u300d\u306e\u57fa\u672c<\/h2>\n<p><strong>JSON<\/strong>\uff08JavaScript Object Notation\uff09\u306f\u3001\u4eba\u9593\u304c\u8aad\u3093\u3067\u7406\u89e3\u3057\u3084\u3059\u3044\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e<strong>\u30c7\u30fc\u30bf\u4ea4\u63db\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/strong>\u3067\u3059\u3002Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u30b5\u30fc\u30d0\u30fc\u9593\u306eAPI\u901a\u4fe1\u3067\u3001\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u969b\u306b\u6700\u3082\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u6700\u5927\u306e\u30e1\u30ea\u30c3\u30c8\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u3055\u3068\u8efd\u91cf\u6027\u3067\u3059\u3002<strong>XML<\/strong>\u3084<strong>CSV<\/strong>\u3068\u6bd4\u3079\u3066\u4f59\u5206\u306a\u60c5\u5831\u304c\u5c11\u306a\u304f\u3001\u901a\u4fe1\u91cf\u3092\u6291\u3048\u3089\u308c\u307e\u3059\u3002\u307e\u305f\u3001<strong>JavaScript<\/strong>\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u8a18\u6cd5\u3092\u57fa\u306b\u3057\u3066\u3044\u308b\u305f\u3081\u3001<strong>JavaScript<\/strong>\u3068\u306e\u89aa\u548c\u6027\u304c\u975e\u5e38\u306b\u9ad8\u3044\u306e\u3082\u7279\u5fb4\u3067\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aJSON\uff08JavaScript Object Notation\uff09<\/strong><br \/>\n      \u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002\u30ad\u30fc\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u307f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u4e2d\u62ec\u5f27\uff09\u3068\u914d\u5217\uff08\u89d2\u62ec\u5f27\uff09\u3067\u968e\u5c64\u69cb\u9020\u3092\u8868\u73fe\u3057\u307e\u3059\u3002API\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u3084\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u5e83\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002\n    <\/p>\n<\/blockquote>\n<h3>JSON\u306e\u57fa\u672c\u30eb\u30fc\u30eb\uff1a\u305f\u3063\u305f\u3053\u308c\u3060\u3051\u899a\u3048\u308c\u3070OK<\/h3>\n<p><strong>JSON<\/strong>\u306e\u69cb\u6587\u306f\u3001\u305f\u3063\u305f3\u3064\u306e\u57fa\u672c\u30eb\u30fc\u30eb\u3067\u6210\u308a\u7acb\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\n<p><strong>\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2<\/strong>\uff1a\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u306f\u3001<code>\"\u30ad\u30fc\": \"\u5024\"<\/code>\u306e\u30da\u30a2\u3067\u8868\u73fe\u3055\u308c\u307e\u3059\u3002\u30ad\u30fc\u306f\u5fc5\u305a\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff08<code>\"<\/code>\uff09\u3067\u56f2\u307f\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\uff1a\u8907\u6570\u306e\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u3092\u307e\u3068\u3081\u308b\u969b\u306f\u3001\u4e2d\u62ec\u5f27\uff08<code>{}<\/code>\uff09\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u5217<\/strong>\uff1a\u8907\u6570\u306e\u5024\u3092\u30ea\u30b9\u30c8\u3068\u3057\u3066\u6271\u3046\u969b\u306f\u3001\u89d2\u62ec\u5f27\uff08<code>[]<\/code>\uff09\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u65e5\u5e38\u4f8b\u3048\uff1a\u8cb7\u3044\u7269\u30ea\u30b9\u30c8\u3068\u51b7\u8535\u5eab\u3067JSON\u3092\u7406\u89e3\u3059\u308b<\/h3>\n<figure>\n    <img decoding=\"async\" src=\"https:\/\/route-zero.com\/recruit\/wp-content\/uploads\/2025\/09\/\u65e5\u5e38\u4f8b\u3048\uff1a\u8cb7\u3044\u7269\u30ea\u30b9\u30c8\u3068\u51b7\u8535\u5eab\u3067JSON\u3092\u7406\u89e3\u3059\u308b.jpg\" alt=\"\u8cb7\u3044\u7269\u30ea\u30b9\u30c8\u3068\u51b7\u8535\u5eab\u3067JSON\u3092\u7406\u89e3\u3059\u308b\u30a4\u30e9\u30b9\u30c8\" style=\"max-width: 100%; height: auto; display: block; margin: 0.5em 0\" loading=\"lazy\" \/><figcaption style=\"font-size: 0.9rem; color: #666; margin-top: 0.25em\">\u56f3\uff1a\u8cb7\u3044\u7269\u30ea\u30b9\u30c8\u3068\u51b7\u8535\u5eab\u3067JSON\u306e\u69cb\u9020\u3092\u4f8b\u3048\u305f\u30a4\u30e9\u30b9\u30c8<\/figcaption><\/figure>\n<p>JSON\u3092\u65e5\u5e38\u306b\u7f6e\u304d\u63db\u3048\u308b\u3068\u30a4\u30e1\u30fc\u30b8\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u51b7\u8535\u5eab\u30921\u3064\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u7bb1\uff09\u3068\u8003\u3048\u3001\u7bb1\u306e\u4e2d\u306b\u5165\u3063\u3066\u3044\u308b\u98df\u54c1\u306e\u4e00\u89a7\u3092\u914d\u5217\uff08\u30ea\u30b9\u30c8\uff09\u3067\u8868\u73fe\u3057\u307e\u3059\u3002\u30ad\u30fc\u306f\u30e9\u30d9\u30eb\uff08\u4f8b\uff1aowner\u3001items\uff09\u3001\u5024\u306f\u30e9\u30d9\u30eb\u306b\u66f8\u304b\u308c\u305f\u4e2d\u8eab\u3067\u3059\u3002<\/p>\n<pre><code>{\r\n  \"fridge\": {\r\n    \"owner\": \"\u82b1\u5b50\",\r\n    \"items\": [\r\n      { \"name\": \"\u725b\u4e73\", \"count\": 1 },\r\n      { \"name\": \"\u5375\", \"count\": 6 },\r\n      { \"name\": \"\u308a\u3093\u3054\", \"count\": 4 }\r\n    ]\r\n  },\r\n  \"shoppingList\": [\"\u725b\u4e73\", \"\u30d1\u30f3\", \"\u30d0\u30ca\u30ca\"]\r\n}<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306e\u5bfe\u5fdc\uff1a<\/p>\n<ul>\n<li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08{&#8220;{&#8220;}&#8230;{&#8220;}&#8221;&#8221;}\uff09\uff1d \u51b7\u8535\u5eab\u3001\u7bb1\u3001\u3042\u308b\u3044\u306f\u30e1\u30cb\u30e5\u30fc\u5168\u4f53<\/li>\n<li>\u30ad\u30fc\uff1d \u30e9\u30d9\u30eb\uff08owner\u3001items\u3001shoppingList\uff09<\/li>\n<li>\u914d\u5217\uff08[ &#8230; ]\uff09\uff1d \u8907\u6570\u306e\u30a2\u30a4\u30c6\u30e0\u304c\u4e26\u3076\u8cb7\u3044\u7269\u30ea\u30b9\u30c8\u3084\u98df\u54c1\u306e\u4e00\u89a7<\/li>\n<li>\u5024\uff1d \u5b9f\u969b\u306e\u4e2d\u8eab\uff08\u6587\u5b57\u5217\u3001\u6570\u5024\u3001\u30cd\u30b9\u30c8\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u3069\uff09<\/li>\n<\/ul>\n<p>\u3053\u306e\u3088\u3046\u306b\u65e5\u5e38\u306e\u300c\u7bb1\u3068\u30e9\u30d9\u30eb\u3001\u30ea\u30b9\u30c8\u300d\u306e\u8003\u3048\u65b9\u3067\u898b\u308b\u3068\u3001JSON\u306e\u69cb\u9020\u304c\u76f4\u611f\u7684\u306b\u7406\u89e3\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>JSON\u306e\u7279\u5b9a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5165\u308c\u308b\u30fb\u53d6\u308a\u51fa\u3059<\/h3>\n<p>\u7c21\u6613\u7684\u306aJS\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u6570\u3092\u4f7f\u3063\u305f\u6700\u5c0f\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code>\/\/ \u521d\u671f\u30c7\u30fc\u30bf\u3092\u5909\u6570\u3067\u4fdd\u6301\uff08JSON\u76f8\u5f53\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\r\nlet user = { id: 1, name: \"\u4f50\u85e4 \u5927\u8f14\", age: 28 };\r\n\r\n\/\/ \u7279\u5b9a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u66f4\u65b0\uff08\u4f8b\uff1aage \u3092\u5909\u66f4\uff09\r\nuser.age = 29; \/\/ \u3053\u3053\u3067\u7279\u5b9a\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u5024\u3092\u5165\u308c\u308b\r\n\r\n\/\/ \u7279\u5b9a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u308a\u51fa\u3059\uff08\u4f8b\uff1aname\uff09\r\nconst name = user.name;\r\nconsole.log(\"\u540d\u524d:\", name);\r\nconsole.log(\"\u540d\u524d:\", name);<\/code><\/pre>\n<p>\uff08fetch\u3067\u306eAPI\u53d6\u5f97\u3084CORS\u306e\u6271\u3044\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/route-zero.com\/recruit\/route\/1128\/\">JavaScript\u306eAjax\u5b8c\u5168\u5165\u9580\uff5cfetch\u306e\u4f7f\u3044\u65b9\u30fbCORS\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u30fb\u975e\u540c\u671f\u901a\u4fe1\u306e\u57fa\u672c\u3092\u89e3\u8aac<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<h3>JSON\u3068XML\u30fbCSV\u306e\u9055\u3044\uff1a\u30a8\u30f3\u30b8\u30cb\u30a2\u306a\u3089\u77e5\u308b\u3079\u304d3\u3064\u306e\u6bd4\u8f03\u30dd\u30a4\u30f3\u30c8<\/h3>\n<p><strong>JSON<\/strong>\u304c<strong>XML<\/strong>\u3084<strong>CSV<\/strong>\u3088\u308a\u3082\u73fe\u4ee3\u306eWeb\u958b\u767a\u3067\u4e3b\u6d41\u306b\u306a\u3063\u305f\u7406\u7531\u3092\u30013\u3064\u306e\u89b3\u70b9\u304b\u3089\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u6bd4\u8f03\u9805\u76ee<\/th>\n<th>JSON<\/th>\n<th>XML<\/th>\n<th>CSV<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u53ef\u8aad\u6027<\/strong><\/td>\n<td>\u9ad8\u3044<\/td>\n<td>\u4f4e\u3044\uff08\u30bf\u30b0\u304c\u591a\u304f\u8907\u96d1\uff09<\/td>\n<td>\u9ad8\u3044\uff08\u5358\u7d14\u306a\u8868\u5f62\u5f0f\uff09<\/td>\n<\/tr>\n<tr>\n<td><strong>\u30c7\u30fc\u30bf\u69cb\u9020<\/strong><\/td>\n<td>\u8907\u96d1\u306a\u968e\u5c64\u69cb\u9020\u3092\u8868\u73fe\u53ef\u80fd<\/td>\n<td>\u8907\u96d1\u306a\u968e\u5c64\u69cb\u9020\u3092\u8868\u73fe\u53ef\u80fd<\/td>\n<td>\u30b7\u30f3\u30d7\u30eb\u306a\u8868\u5f62\u5f0f\u306e\u307f<\/td>\n<\/tr>\n<tr>\n<td><strong>\u901a\u4fe1\u91cf<\/strong><\/td>\n<td>\u8efd\u91cf<\/td>\n<td>\u91cd\u3044<\/td>\n<td>\u6700\u3082\u8efd\u91cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u3001<strong>JSON<\/strong>\u306f\u4eba\u9593\u3068\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u3069\u3061\u3089\u306b\u3068\u3063\u3066\u3082\u300c\u6271\u3044\u3084\u3059\u3044\u300d\u30d0\u30e9\u30f3\u30b9\u306e\u53d6\u308c\u305f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u3092\u968e\u5c64\u7684\u306b\u6271\u3048\u308b\u67d4\u8edf\u6027\u3068\u3001\u8efd\u91cf\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6587\u304c\u3001\u73fe\u4ee3\u306eWeb API\u958b\u767a\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>&#x2705;\u3010\u5b9f\u52d9\u3067\u6d3b\u304b\u3059\u3011Web\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u30cf\u30de\u308a\u304c\u3061\u306aJSON\u306e\u843d\u3068\u3057\u7a74<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001\u65e5\u3005\u306e\u696d\u52d9\u3067\u79c1\u305f\u3061\u304c\u76f4\u9762\u3059\u308b\u3067\u3042\u308d\u3046\u3001\u5177\u4f53\u7684\u306a<strong>JSON<\/strong>\u306e\u30a8\u30e9\u30fc\u3068\u89e3\u6c7a\u7b56\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\u5358\u306a\u308b\u69cb\u6587\u30df\u30b9\u3067\u306f\u306a\u304f\u3001\u8a2d\u8a08\u601d\u60f3\u304c\u539f\u56e0\u3067\u8d77\u304d\u308b\u554f\u984c\u306b\u7126\u70b9\u3092\u5f53\u3066\u307e\u3059\u3002<\/p>\n<h3>Case1\uff1aany\u578b\u3067\u578b\u5b89\u5168\u6027\u3092\u5931\u3046<strong>TypeScript<\/strong>\u306e\u30b1\u30fc\u30b9<\/h3>\n<p><strong>any<\/strong>\u578b\u306f\u3001\u4e00\u898b\u4fbf\u5229\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u5f8c\u3005\u306e\u4e88\u671f\u305b\u306c\u30d0\u30b0\u3092\u751f\u307f\u51fa\u3059\u5178\u578b\u7684\u306a\u30a2\u30f3\u30c1\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aany\u578b\uff08TypeScript\uff09<\/strong><br \/>\n      \u3069\u3093\u306a\u5024\u3067\u3082\u8a31\u5bb9\u3059\u308b\u7279\u6b8a\u306a\u578b\u3067\u3059\u3002\u578b\u30c1\u30a7\u30c3\u30af\u3092\u56de\u907f\u3067\u304d\u308b\u305f\u3081\u4e00\u6642\u7684\u306b\u306f\u4fbf\u5229\u3067\u3059\u304c\u3001\u9577\u671f\u7684\u306b\u306f\u578b\u5b89\u5168\u6027\u3092\u640d\u306a\u3044\u30d0\u30b0\u306e\u539f\u56e0\u306b\u306a\u308a\u307e\u3059\u3002\u53ef\u80fd\u306a\u9650\u308a\u5177\u4f53\u7684\u306a\u578b\u5b9a\u7fa9\u3084\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u578b\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>\/\/ \u30c0\u30e1\u306a\u4f8b\uff1aany\u578b\u3067API\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u53d7\u3051\u53d6\u308b\r\nasync function fetchUserData(userId: number): Promise&lt;any&gt; {\r\n  const response = await fetch(`\/api\/users\/${userId}`);\r\n  const data = await response.json();\r\n  \/\/ `data`\u306e\u4e2d\u8eab\u304c\u4e0d\u660e\u306a\u305f\u3081\u3001\u3069\u3053\u304b\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\r\n  return data;\r\n}<\/code><\/pre>\n<p>\uff08TypeScript\u306e\u57fa\u672c\u7684\u306a\u578b\u8a2d\u8a08\u3084\u578b\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/route-zero.com\/recruit\/route\/1279\">TypeScript\u3068\u306f\uff1fJavaScript\u3068\u306e\u9055\u3044\u3092\u521d\u5fc3\u8005\u5411\u3051\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<p><strong>any<\/strong>\u578b\u3092\u4f7f\u3046\u3068\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u578b\u306e\u5b89\u5168\u6027\u304c\u5931\u308f\u308c\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u6642\u306b\u521d\u3081\u3066\u30a8\u30e9\u30fc\u304c\u767a\u899a\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u9632\u3050\u306b\u306f\u3001\u53d7\u3051\u53d6\u308b<strong>JSON<\/strong>\u306e\u30b9\u30ad\u30fc\u30de\u3092\u6b63\u78ba\u306b\u578b\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u4e0d\u53ef\u6b20\u3067\u3059\u3002<\/p>\n<pre><code>\/\/ \u826f\u3044\u4f8b\uff1a\u578b\u3092\u6b63\u78ba\u306b\u5b9a\u7fa9\u3057\u3001\u5b89\u5168\u6027\u3092\u9ad8\u3081\u308b\r\ninterface UserData {\r\n  id: number;\r\n  name: string;\r\n  email: string;\r\n}\r\n\r\nasync function fetchUserData(userId: number): Promise&lt;UserData&gt; {\r\n  const response = await fetch(`\/api\/users\/${userId}`);\r\n  const data: UserData = await response.json(); \/\/ \u578b\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u3067\u5b89\u5168\u6027\u3092\u4fdd\u8a3c\r\n  return data;\r\n}<\/code><\/pre>\n<h3>Case2\uff1a\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u4e0d\u4e00\u81f4\u3067\u30d1\u30fc\u30b9\u30a8\u30e9\u30fc\u304c\u51fa\u308b<strong>Java<\/strong>\u306e\u30b1\u30fc\u30b9<\/h3>\n<p><strong>Java<\/strong>\u306b\u304a\u3051\u308bAPI\u9023\u643a\u3067<code>HttpMessageNotReadableException<\/code>\u306a\u3069\u306e\u30a8\u30e9\u30fc\u306b\u906d\u9047\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001<strong>Java<\/strong>\u306e<strong>DTO<\/strong>\uff08Data Transfer Object\uff09\u3068\u3001\u53d7\u3051\u53d6\u3063\u305f<strong>JSON<\/strong>\u306e\u30ad\u30fc\u540d\u304c\u4e00\u81f4\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306b\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aDTO\uff08Data Transfer Object\uff09<\/strong><br \/>\n      \u30b7\u30b9\u30c6\u30e0\u9593\u3067\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u6e21\u3059\u305f\u3081\u306e\u5358\u7d14\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002\u53d7\u3051\u53d6\u308bJSON\u306e\u69cb\u9020\u3068\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u304c\u4e00\u81f4\u3057\u3066\u3044\u306a\u3044\u3068\u30de\u30c3\u30d4\u30f3\u30b0\u30a8\u30e9\u30fc\u306b\u306a\u308b\u305f\u3081\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>\/\/ \u30c0\u30e1\u306a\u4f8b\r\nJSON: {\"user_name\": \"daisuke\"}\r\nJava DTO:\r\n  private String userName;<\/code><\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001\u30ad\u30fc\u540d\u304c<code>user_name<\/code>\uff08\u30b9\u30cd\u30fc\u30af\u30b1\u30fc\u30b9\uff09\u3068<code>userName<\/code>\uff08\u30ad\u30e3\u30e1\u30eb\u30b1\u30fc\u30b9\uff09\u3067\u4e00\u81f4\u305b\u305a\u3001\u30d1\u30fc\u30b9\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u89e3\u6c7a\u7b56<\/strong><br \/><strong>Java<\/strong>\u3067\u306f\u3001<code>@JsonProperty<\/code>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001<strong>JSON<\/strong>\u306e\u30ad\u30fc\u540d\u3068<strong>DTO<\/strong>\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>\/\/ \u826f\u3044\u4f8b\r\nimport com.fasterxml.jackson.annotation.JsonProperty;\r\n\r\npublic class UserDto {\r\n  @JsonProperty(\"user_name\")\r\n  private String userName;\r\n\r\n  \/\/ getter, setter ...\r\n}<\/code><\/pre>\n<p>\uff08Spring Boot\u3067\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u53d7\u3051\u53d6\u308a\u3084<code>@RequestBody<\/code>\u306e\u6271\u3044\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/route-zero.com\/recruit\/route\/1336\/\">Spring Boot \u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u53d7\u3051\u53d6\u308a\uff5c@ModelAttribute \u3068 @RequestBody \u306e\u9055\u3044\u3068\u4f7f\u3044\u5206\u3051<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<hr \/>\n<h2>\u300c\u52d5\u304f\u300d\u304b\u3089\u300c\u7f8e\u3057\u3044\u300d\u3078\uff01\u4fdd\u5b88\u6027\u3092\u9ad8\u3081\u308bJSON\u8a2d\u8a08\u306e\u539f\u5247<\/h2>\n<p>\u5358\u306b\u30a8\u30e9\u30fc\u3092\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u3088\u308a\u826f\u3044\u8a2d\u8a08\u3092\u3059\u308b\u3053\u3068\u3067\u3001\u5c06\u6765\u7684\u306a\u30d0\u30b0\u3092\u672a\u7136\u306b\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>JSON\u8a2d\u8a08\u306e\u9375\u306f\u300c\u518d\u5229\u7528\u6027\u300d\u3068\u300c\u4e88\u6e2c\u53ef\u80fd\u6027\u300d<\/h3>\n<p><strong>JSON<\/strong>\u3092\u8a2d\u8a08\u3059\u308b\u969b\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u539f\u5247\u3092\u610f\u8b58\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\n<p><strong>\u518d\u5229\u7528\u6027<\/strong>\uff1a\u540c\u3058\u30c7\u30fc\u30bf\u69cb\u9020\u306f\u3001\u3067\u304d\u308b\u3060\u3051\u4f7f\u3044\u56de\u305b\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001<code>{\"user\": {\"id\": 1, ...}}<\/code>\u3068\u3044\u3046\u69cb\u9020\u304c\u8907\u6570\u7b87\u6240\u3067\u4f7f\u308f\u308c\u308b\u5834\u5408\u3001<code>User<\/code>\u3068\u3044\u3046\u5171\u901a\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3001\u518d\u5229\u7528\u6027\u3092\u9ad8\u3081\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4e88\u6e2c\u53ef\u80fd\u6027<\/strong>\uff1aAPI\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u69cb\u9020\u306f\u3001\u53d7\u3051\u53d6\u308b\u5074\u304c\u300c\u6b21\u306b\u4f55\u304c\u6765\u308b\u304b\u300d\u3092\u4e88\u6e2c\u3067\u304d\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001<code>{\"data\": [...], \"meta\": {...}}<\/code>\u3068\u3044\u3063\u305f\u6a19\u6e96\u7684\u306a\u30e9\u30c3\u30d1\u69cb\u9020\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u4ed6\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u3082\u76f4\u611f\u7684\u306b\u7406\u89e3\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u5931\u6557\u3057\u306a\u3044\u305f\u3081\u306eJSON\u8a2d\u8a08\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h3>\n<p>\u958b\u767a\u3092\u59cb\u3081\u308b\u524d\u306b\u3001\u3053\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3092\u30c1\u30fc\u30e0\u3067\u5171\u6709\u3057\u3001\u8a2d\u8a08\u30df\u30b9\u3092\u9632\u304e\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\n<p><strong>\u547d\u540d\u898f\u5247<\/strong>\uff1a<code>camelCase<\/code>\u304b<code>snake_case<\/code>\u304b\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u3067\u7d71\u4e00\u3055\u308c\u3066\u3044\u307e\u3059\u304b\uff1f<\/p>\n<\/li>\n<li>\n<p><strong>\u5fc5\u9808\/\u4efb\u610f<\/strong>\uff1a\u5404\u30ad\u30fc\u304c\u5fc5\u9808\u306a\u306e\u304b\u3001\u4efb\u610f\u306a\u306e\u304b\u304c\u660e\u78ba\u3067\u3059\u304b\uff1f\uff08\u4f8b\uff1a<code>\"user_id\"<\/code>\u306f\u5fc5\u9808\u3060\u304c\u3001<code>\"phone_number\"<\/code>\u306f\u4efb\u610f\u306a\u3069\uff09<\/p>\n<\/li>\n<li>\n<p><strong>\u30c7\u30fc\u30bf\u578b<\/strong>\uff1a<code>number<\/code>\u304b<code>string<\/code>\u304b\u3001\u53b3\u5bc6\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u304b\uff1f\u7279\u306b\u65e5\u4ed8\u3084\u6570\u5024\u306f\u3001\u610f\u56f3\u3057\u306a\u3044\u578b\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3068\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081\uff1aJSON\u3092\u5236\u3059\u308b\u8005\u304cAPI\u958b\u767a\u3092\u5236\u3059\u308b<\/h2>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u300cJSON\u3068\u306f\u300d\u3068\u3044\u3046\u57fa\u790e\u304b\u3089\u3001Web\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u76f4\u9762\u3059\u308b\u5177\u4f53\u7684\u306a\u30a8\u30e9\u30fc\u4e8b\u4f8b\u3001\u305d\u3057\u3066\u4fdd\u5b88\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u306e\u8a2d\u8a08\u539f\u5247\u307e\u3067\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><strong>JSON<\/strong>\u306f\u5358\u306a\u308b\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li>\n<p>\u6b63\u3057\u3044\u69cb\u6587\u3092\u77e5\u308b\u3053\u3068\u3067\u3001\u76ee\u306e\u524d\u306e\u30a8\u30e9\u30fc\u306f\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u8a2d\u8a08\u601d\u60f3\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u5c06\u6765\u7684\u306a\u30d0\u30b0\u3092\u9632\u304e\u3001\u3088\u308a\u7f8e\u3057\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>JSON<\/strong>\u306e\u77e5\u8b58\u3092\u6df1\u3081\u308b\u3053\u3068\u306f\u3001\u3042\u306a\u305f\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u5e02\u5834\u4fa1\u5024\u3092\u4e0a\u3052\u3001\u3088\u308a\u88c1\u91cf\u6a29\u306e\u3042\u308b\u6848\u4ef6\u3084\u3001\u30c1\u30fc\u30e0\u3092\u4e3b\u5c0e\u3059\u308b\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u306e\u9053\u3092\u958b\u304d\u307e\u3059\u3002\u305c\u3072\u3001\u307e\u305a\u306f\u624b\u5143\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u52d5\u304b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<hr \/>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff08\u307e\u3068\u3081\uff09\uff1aAPI \/ \u30b9\u30ad\u30fc\u30de \/ \u30d1\u30fc\u30b9<\/strong><br \/>\n      <strong>API<\/strong>\uff1a\u30b7\u30b9\u30c6\u30e0\u3084\u30b5\u30fc\u30d3\u30b9\u304c\u5916\u90e8\u306b\u63d0\u4f9b\u3059\u308b\u6a5f\u80fd\u306e\u7a93\u53e3\u3002 <strong>\u30b9\u30ad\u30fc\u30de<\/strong>\uff1a\u30c7\u30fc\u30bf\u306e\u5f62\uff08\u578b\u3084\u5fc5\u9808\/\u4efb\u610f\uff09\u3092\u5b9a\u7fa9\u3057\u305f\u3082\u306e\u3002 <strong>\u30d1\u30fc\u30b9<\/strong>\uff1a\u30c6\u30ad\u30b9\u30c8\uff08\u4f8b\uff1aJSON\uff09\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u5909\u63db\u3059\u308b\u51e6\u7406\u3002\n    <\/p>\n<\/blockquote>\n<h3>FAQ\u30bb\u30af\u30b7\u30e7\u30f3<\/h3>\n<ul>\n<li>\n<p><strong>Q. JSON\u306e\u30c7\u30fc\u30bf\u578b\u306b\u4f7f\u3048\u308b\u3082\u306e\u306f\u4f55\u3067\u3059\u304b\uff1f<\/strong><\/p>\n<\/li>\n<li>\n<p>A. <code>string<\/code>\u3001<code>number<\/code>\u3001<code>boolean<\/code>\u3001<code>object<\/code>\u3001<code>array<\/code>\u3001<code>null<\/code>\u306e6\u7a2e\u985e\u304c\u4f7f\u3048\u307e\u3059\u3002<code>undefined<\/code>\u3084\u95a2\u6570\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002<\/p>\n<\/li>\n<li>\n<p><strong>Q. JSON\u3092\u6271\u3046\u305f\u3081\u306e\u4fbf\u5229\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3042\u308a\u307e\u3059\u304b\uff1f\uff08Java\/TypeScript\uff09<\/strong><\/p>\n<\/li>\n<li>\n<p>A. <strong>Java<\/strong>\u3067\u306f<strong>Jackson<\/strong>\u3084<strong>Gson<\/strong>\u3001<strong>TypeScript<\/strong>\u3067\u306f<strong>zod<\/strong>\u3084<strong>io-ts<\/strong>\u304c\u6709\u540d\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u578b\u5b89\u5168\u306a<strong>JSON<\/strong>\u30d1\u30fc\u30b9\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>Q. JSON\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u304b\uff1f<\/strong><\/p>\n<\/li>\n<li>\n<p>A. \u4fe1\u983c\u3067\u304d\u306a\u3044\u30bd\u30fc\u30b9\u304b\u3089\u306e<strong>JSON<\/strong>\u3092\u30d1\u30fc\u30b9\u3059\u308b\u969b\u306f\u3001\u60aa\u610f\u306e\u3042\u308b\u30b3\u30fc\u30c9\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u304b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u7279\u306b<code>eval()<\/code>\u306a\u3069\u3092\u4f7f\u3046\u3068\u8106\u5f31\u6027\u306b\u3064\u306a\u304c\u308b\u305f\u3081\u3001<code>JSON.parse()<\/code>\u3092\u4f7f\u3046\u3079\u304d\u3067\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<\/div>\n","protected":false},"featured_media":1613,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1610"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/1613"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}