{"id":31031,"date":"2017-08-27T20:18:41","date_gmt":"2017-08-27T11:18:41","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=31031"},"modified":"2024-05-06T11:44:43","modified_gmt":"2024-05-06T02:44:43","slug":"%e3%80%90cakephp%e5%85%a5%e9%96%80%e3%80%91json%e5%bd%a2%e5%bc%8f%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e5%87%ba%e5%8a%9b%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/31031","title":{"rendered":"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30e9\u30a4\u30bf\u30fc\u306e\u4e80\u7530\u3067\u3059\u3002\u5b9f\u7528\u7684\u306aWeb\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u969b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u901a\u4fe1\u306f\u3068\u3066\u3082\u91cd\u8981\u306a\u8ab2\u984c\u3067\u3059\u3002<\/p>\n<p>Web\u30a2\u30d7\u30ea\u3067\u306e\u30c7\u30fc\u30bf\u901a\u4fe1\u306b\u826f\u304f\u4f7f\u308f\u308c\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u3068\u3057\u3066\u3001JSON\u3068XML\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u3068\u3066\u3082\u6271\u3044\u3084\u3059\u304f\u3001\u5927\u5909\u4fbf\u5229\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002<\/p>\n<p>CakePHP\u306b\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u7c21\u5358\u306b\u6271\u3048\u308b\u65b9\u6cd5\u304c\u5b58\u5728\u3057\u3066\u307e\u3059\u3002\u4eca\u56de\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u3046\u3061\u3001\u7279\u306bJSON\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"box01\">\n<ul>\n<li><b>JSON\u3068\u306f<\/b><\/li>\n<li><b>JsonView\u3068XmlView\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<li><b>JSONP\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<\/ul>\n<\/div>\n<h2>JSON\u3068\u306f<\/h2>\n<p>JSON\u3068\u306fJavaScript Object Notation\u306e\u7565\u3067\u3001<b>\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4e00\u7a2e<\/b>\u3067\u3059\u3002\u540d\u524d\u306e\u7531\u6765\u306e\u901a\u308aJavaScript\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u8868\u8a18\u69cb\u6587\u306e\u30b5\u30d6\u30bb\u30c3\u30c8\u3068\u3057\u3066\u6271\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001XML\u306f\u3001ExtensibleMarkupLanguage\u306e\u7565\u3067\u3042\u308a\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u69d8\u3005\u306a\u30c7\u30fc\u30bf\u3092\u6271\u3046<b>\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4e00\u7a2e<\/b>\u3067\u3059\u3002\u57fa\u306b\u306a\u3063\u305f\u306e\u304cHTML\u5f62\u5f0f\u3067\u3042\u308a\u3001HTML\u540c\u69d8&lt;&gt;\u3067\u631f\u307e\u308c\u305f\u30bf\u30b0\u3067\u306f\u3055\u307e\u308c\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u898b\u305f\u76ee\u304cHTML\u3068\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001HTML\u3092\u62bd\u8c61\u5316\u3057\u3066\u4f5c\u3089\u308c\u305f\u306e\u304c\u3053\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306a\u306e\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u306f\u3053\u306e2\u3064\u3001\u5f62\u5f0f\u306f\u9055\u3046\u306e\u3067\u3059\u304c\u3001<b>\u307b\u307c\u540c\u3058\u3082\u306e\u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b<\/b>\u306e\u3067\u3059\u3002\u3067\u3059\u304b\u3089\u3001\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u4f7f\u3044\u5206\u3051\u308c\u3070\u3044\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>JSON\u306e\u7279\u5fb4\u3092\u3042\u3052\u308b\u306e\u306a\u3089\u3001XML\u3068\u6bd4\u3079\u3066\u3082\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3067\u3042\u308a\u3001 \u5404\u7a2e\u8a00\u8a9e\u3068\u306e\u89aa\u548c\u6027\u3082\u9ad8\u304f\u4f7f\u3044\u52dd\u624b\u3082\u826f\u3044\u3068\u3044\u3046\u70b9\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002\u305d\u3082\u305d\u3082\u3001JavaScript\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306e\u30c7\u30fc\u30bf\u901a\u4fe1\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u308b\u306e\u3067\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u5927\u5909\u76f8\u6027\u304c\u826f\u3044\u306e\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001PHP\u306b\u306fJSON\u3092\u5229\u7528\u3059\u308bAPI\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/27932\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/image-35-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010PHP\u5165\u9580\u3011JSON\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u65b9\u6cd5\uff08json_encode\/json_decode\uff09<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<h2>JsonView\u3068XmlView\u306e\u4f7f\u3044\u65b9<\/h2>\n<p>\u3067\u306f\u3001\u4e00\u4f53JSON\u306f\u3069\u306e\u3088\u3046\u306a\u5834\u9762\u3067\u4f7f\u308f\u308c\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u4e00\u822c\u306b\u3001JSON\u306f\u3001\u69d8\u3005\u306a\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u3092\u5916\u90e8\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u6271\u3046\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u3053\u3053\u3067\u306f\u3001\u4f55\u3089\u304b\u306e\u30c7\u30fc\u30bf\u3092JSON\u30c7\u30fc\u30bf\u3068\u3057\u3066\u51fa\u529b\u3059\u308b\u7c21\u5358\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u7d39\u4ecb\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u7279\u5b9a\u306eURL\u3092\u6307\u5b9a\u3059\u308c\u3070JSON\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u3001route.php\u3092\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u306a\u304a\u3001\u307f\u3084\u3059\u3055\u306e\u305f\u3081\u306b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u90e8\u5206\u306f\u524a\u9664\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>config\/route.php<\/p>\n<pre class=\"lang:php decode:true \" >&lt;?php\r\n\r\nuse CakeHttpMiddlewareCsrfProtectionMiddleware;\r\nuse CakeRoutingRouteBuilder;\r\nuse CakeRoutingRouter;\r\nuse CakeRoutingRouteDashedRoute;\r\n\r\nRouter::defaultRouteClass(DashedRoute::class);\r\n\r\n#\u4ee5\u4e0b\u306e1\u884c\u3092\u8ffd\u52a0\r\nRouter::extensions(['json', 'xml']);\r\n\r\n\r\nRouter::scope('\/', function (RouteBuilder $routes) {\r\n\r\n    $routes-&gt;registerMiddleware('csrf', new CsrfProtectionMiddleware([\r\n        'httpOnly' =&gt; true\r\n    ]));\r\n\r\n    \r\n    $routes-&gt;applyMiddleware('csrf');\r\n\r\n    $routes-&gt;connect('\/', ['controller' =&gt; 'Pages', 'action' =&gt; 'display', 'home']);\r\n\r\n    \r\n    $routes-&gt;connect('\/pages\/*', ['controller' =&gt; 'Pages', 'action' =&gt; 'display']);\r\n\r\n    $routes-&gt;fallbacks(DashedRoute::class);\r\n});\r\n\r\n<\/pre>\n<p>Router::defaultRouteClass\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eRoute\u3092\u6307\u5b9a\u3059\u308b\u3068\u304d\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001Router::extensions\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u884c\u3044\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001json\u3068xml\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001<b>JSON\u3068XML\u306e\u62e1\u5f35\u5b50\u304c\u4e21\u65b9\u4f7f\u3048\u308b<\/b>\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>src\/controller\/ApiController.php<\/p>\n<pre class=\"decode:true \">&lt;?php\r\nnamespace AppController;\r\n\r\nuse CakeCoreConfigure;\r\nuse CakeNetworkExceptionNotFoundException;\r\nuse CakeViewExceptionMissingTemplateException;\r\n\r\n\r\nclass ApiController extends AppController\r\n{\r\n\r\n    public function test(){\r\n\r\n        $sample_list = [\r\n                [\r\n                  &quot;list&quot; =&gt; &quot;ListA&quot;,\r\n                  &quot;content&quot; =&gt; &quot;ContentA&quot;\r\n                ],\r\n                [\r\n                  &quot;list&quot; =&gt; &quot;ListB&quot;,\r\n                  &quot;content&quot; =&gt; &quot;ContentB&quot;\r\n                ],\r\n                [\r\n                  &quot;list&quot; =&gt; &quot;ListC&quot;,\r\n                  &quot;content&quot; =&gt; &quot;ContentC&quot;\r\n                ]\r\n        ];\r\n\r\n        $this-&gt;set([\r\n            'sample_list' =&gt; $sample_list,\r\n            '_serialize' =&gt; ['sample_list']\r\n        ]);\r\n    }\r\n\r\n}<\/pre>\n<p>\u305f\u3063\u305f\u3053\u308c\u3060\u3051\u306e\u8a2d\u5b9a\u3067\u3001$sample_list\u3068\u3044\u3046\u30c7\u30fc\u30bf\u3092\u3001JSON\u304a\u3088\u3073\u3001XML\u30c7\u30fc\u30bf\u3068\u3057\u3066\u3068\u3057\u3066\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u30a2\u30af\u30bb\u30b9\u3092\u3057\u3066\u307f\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u3087\u3046\u3002XAMPP\u306a\u3069\u306e\u30ed\u30fc\u30ab\u30eb\u306a\u74b0\u5883\u3067\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bURL\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>http:\/\/localhost\/[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d]\/api\/test.json<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u4e0a\u3067json\u306e\u30c7\u30fc\u30bf\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic1.png\" alt=\"pic1\" width=\"300\" height=\"260\" class=\"aligncenter size-full wp-image-31042\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic1.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic1-150x130.png 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u3061\u306a\u307f\u306b\u3001URL\u672b\u5c3e\u306e\u300c.json\u300d\u3092\u3001\u300c.xml\u300d\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>http:\/\/localhost\/[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d]\/api\/test.xml<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic2.png\" alt=\"pic2\" width=\"300\" height=\"260\" class=\"aligncenter size-full wp-image-31043\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic2.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic2-150x130.png 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u540c\u3058\u30c7\u30fc\u30bf\u304cXML\u3067\u51fa\u529b\u3055\u308c\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u3001CakePHP\u3067\u306f\u7c21\u5358\u306b\u30c7\u30fc\u30bf\u3092JSON\u304a\u3088\u3073XML\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>CakePHP\u3067\u306f\u3001.json\u3068.xml\u306e\u3044\u305a\u308c\u304b\u306e\u62e1\u5f35\u5b50\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u3067\u3001 \u81ea\u52d5\u7684\u306b\u65b0\u3057\u3044\u30d3\u30e5\u30fc\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 JSON\u306e\u30af\u30e9\u30b9\u306fJsonView\u3001XML\u306e\u30af\u30e9\u30b9\u306fXmlView\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u30c7\u30fc\u30bf\u30d3\u30e5\u30fc\u306f_serialize\u30ad\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u7c21\u5358\u306b\u751f\u6210\u3055\u308c\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2>JSONP\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u4f7f\u3044\u65b9<\/h2>\n<h3>JSONP\u3068\u306f\u4f55\u304b<\/h3>\n<p>\u6b21\u306b\u3001JSONP\u30ec\u30b9\u30dd\u30f3\u30b9\u3068\u3044\u3046\u65b9\u6cd5\u3092\u7528\u3044\u3001\u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3059\u308b\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>JSONP\u3068\u306f\u3001Javascript\u3067\u975e\u540c\u671f\u3067<b>\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u624b\u6bb5\u306e\u4e00\u3064<\/b>\u3067\u3001JavaScript\u306escript\u30bf\u30b0\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u4ed5\u7d44\u307f\u306e\u3053\u3068\u3067\u3059\u3002HTML\u306escript\u30bf\u30b0\u3001JavaScript\uff08\u95a2\u6570\uff09\u3001JSON\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u5b9f\u73fe\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u975e\u540c\u671f\u901a\u4fe1\u3068\u3044\u3046\u3068Ajax\u304c\u30dd\u30d4\u30e5\u30e9\u30fc\u3067\u3059\u304c\u3001\u30af\u30ed\u30b9\u30c9\u30e1\u30a4\u30f3\u5236\u7d04\u3068\u8a00\u3044\u3046\u5236\u7d04\u304c\u3042\u308a\u4e07\u80fd\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30af\u30ed\u30b9\u30c9\u30e1\u30a4\u30f3\u3068\u306f\u3001\u7570\u306a\u308b\u30c9\u30e1\u30a4\u30f3\u3092\u6301\u3064\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u9593\u306e\u30a2\u30af\u30bb\u30b9\u306e\u3053\u3068\u3092\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p>\u30af\u30ed\u30b9\u30c9\u30e1\u30a4\u30f3\u5236\u7d04\u3068\u306f\u3001\u3053\u308c\u3092\u8a31\u53ef\u3057\u306a\u3044\u3053\u3068\u3067\u3042\u308a\u3001ajax\u3067\u306f\u7570\u306a\u308b\u30c9\u30e1\u30a4\u30f3\u9593\u306e\u901a\u4fe1\u304c\u539f\u5247\u7981\u6b62\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306b\u5bfe\u3057\u3001<b>JSONP\u306f\u30af\u30ed\u30b9\u30c9\u30e1\u30a4\u30f3\u5236\u7d04\u304c\u7121\u3044<\/b>\u305f\u3081\u3001\u30c9\u30e1\u30a4\u30f3\u304c\u7570\u306a\u308b\u30b5\u30fc\u30d0\u30fc\u9593\u306e\u901a\u4fe1\u306b\u4fbf\u5229\u3067\u3059\u3002\u3067\u3059\u306e\u3067\u3001\u3069\u306e\u3088\u3046\u306a\u65b9\u6cd5\u3067\u975e\u540c\u671f\u901a\u4fe1\u3092\u3059\u308b\u306e\u304b\u306b\u3088\u3063\u3066\u624b\u6bb5\u3092\u4f7f\u3044\u5206\u3051\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001Ajax\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/31050?p=31050&amp;preview=true\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image19-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010CakePHP\u5165\u9580\u3011Ajax\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<h3>JSONP\u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u307f\u308b<\/h3>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306bJSONP\u306e\u4ed5\u7d44\u307f\u3092\u7528\u3044\u3001\u524d\u8ff0\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u51fa\u529b\u3055\u308c\u305fjson\u30d5\u30a1\u30a4\u30eb\u3092\u53d7\u3051\u53d6\u3063\u3066\u305d\u306e\u5185\u5bb9\u3092\u51fa\u529b\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u306fApiController.php\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"lang:php decode:true \" >&lt;?php\r\nnamespace AppController;\r\n\r\nuse CakeCoreConfigure;\r\nuse CakeNetworkExceptionNotFoundException;\r\nuse CakeViewExceptionMissingTemplateException;\r\n\r\n\r\nclass ApiController extends AppController\r\n{\r\n\r\n    public function test(){\r\n        #\u4ee5\u4e0b\u306e1\u884c\u3092\u8ffd\u52a0\r\n        $this-&gt;response-&gt;header(&quot;Access-Control-Allow-Origin: *&quot;); \r\n\r\n        $sample_list = [\r\n                [\r\n                  &quot;list&quot; =&gt; &quot;ListA&quot;,\r\n                  &quot;content&quot; =&gt; &quot;ContentA&quot;\r\n                ],\r\n                [\r\n                  &quot;list&quot; =&gt; &quot;ListB&quot;,\r\n                  &quot;content&quot; =&gt; &quot;ContentB&quot;\r\n                ],\r\n                [\r\n                  &quot;list&quot; =&gt; &quot;ListC&quot;,\r\n                  &quot;content&quot; =&gt; &quot;ContentC&quot;\r\n                ]\r\n        ];\r\n\r\n\r\n\r\n        $this-&gt;set([\r\n            'sample_list' =&gt; $sample_list,\r\n            '_serialize' =&gt; ['sample_list'],\r\n            #\u4ee5\u4e0b\u306e1\u884c\u3092\u8ffd\u52a0\r\n            '_jsonp' =&gt; true\r\n        ]);\r\n    }\r\n\r\n}<\/pre>\n<p>\u6b21\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001jQuery\u306egetJSON\u95a2\u6570\u3092\u7528\u3044\u3066\u3067json\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u51fa\u3057\u3001HTML\u3092\u51fa\u529b\u3059\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>sample.html<\/p>\n<pre class=\"decode:true \">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot; \/&gt;\r\n&lt;title&gt;jQuery TIPS&lt;\/title&gt;\r\n&lt;script src=&quot;http:\/\/code.jquery.com\/jquery-1.11.3.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;dl id=&quot;wrap&quot;&gt;\r\n        &lt;script type=&quot;text\/javascript&quot;&gt;\r\n            $(function(){\r\n            $.getJSON(&quot;http:\/\/localhost\/json\/api\/test.json&quot;, function(data){\r\n                for(var i in data.sample_list){\r\n                    var h = '&lt;dt&gt;'\r\n                            + data.sample_list[i].list\r\n                            + '&lt;\/dt&gt;'\r\n                            + '&lt;dd&gt;'\r\n                            + data.sample_list[i].content\r\n                            + '&lt;\/dd&gt;';\r\n                    $(&quot;dl#wrap&quot;).append(h);\r\n                }\r\n            })\r\n        });\r\n        &lt;\/script&gt;\r\n    &lt;\/dl&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u5b9f\u969b\u306b\u4f7f\u3046\u3068\u304d\u306f\u3001\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u5148url\u3067\u3042\u308bhttp:\/\/localhost\/json\/api\/test.json\u306e\u90e8\u5206\u3092\u3001\u4efb\u610f\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u66f8\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30da\u30fc\u30b8\u3092Web\u30b5\u30fc\u30d0\u30fc\u306e\u9069\u5207\u306a\u5834\u6240\u306b\u914d\u7f6e\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic3.png\" alt=\"pic3\" width=\"300\" height=\"260\" class=\"aligncenter size-full wp-image-31044\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic3.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/pic3-150x130.png 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u3053\u308c\u3067\u3001CakePHP3\u3067\u51fa\u529b\u3055\u308c\u305fJSON\u3092\u8aad\u307f\u51fa\u3057\u3001\u51fa\u529b\u3067\u304d\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002CakePHP\u3067JSON\u3092\u7528\u3044\u3066\u901a\u4fe1\u3092\u3059\u308b\u969b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u3092\u304b\u3089\u3081\u3066\u3044\u304f\u3068\u3001\u66f4\u306b\u5b9f\u7528\u7684\u306a\u51e6\u7406\u3092\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001CakePHP\u3067JSON\u3092\u51fa\u529b\u3059\u308b\u4ed5\u7d44\u307f\u3068JSONP\/Ajax\u306a\u3069\u3092\u9023\u643a\u3059\u308b\u3068\u3001\u7c21\u5358\u306b\u901a\u4fe1\u304c\u5b9f\u73fe\u3059\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001CakePHP3\u3067JSON\u3092\u6271\u3046\u305f\u3081\u306b\u3001<\/p>\n<div class=\"box01\">\n<ul>\n<li><b>JSON\u3068\u306f<\/b><\/li>\n<li><b>JsonView\u3068XmlView\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<li><b>JSONP\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u306a\u3069\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001CakePHP3\u306eJSONView\u3068JSONP\u3092\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u3001\u7c21\u5358\u306b\u30af\u30ed\u30b9\u30c9\u30e1\u30a4\u30f3\u306e\u975e\u540c\u671f\u901a\u4fe1\u304c\u3067\u304d\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002\u3082\u3057\u3082\u3001JSON\u3067\u4f55\u3089\u304b\u306e\u901a\u4fe1\u306e\u51e6\u7406\u3092\u3057\u305f\u3044\u3068\u304d\u306f\u3001\u3053\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30e9\u30a4\u30bf\u30fc\u306e\u4e80\u7530\u3067\u3059\u3002\u5b9f\u7528\u7684\u306aWeb\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u969b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u901a\u4fe1\u306f\u3068\u3066\u3082\u91cd\u8981\u306a\u8ab2\u984c\u3067\u3059\u3002 Web\u30a2\u30d7\u30ea\u3067\u306e\u30c7\u30fc\u30bf\u901a\u4fe1\u306b\u826f\u304f\u4f7f\u308f\u308c\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u3068\u3057\u3066\u3001JSON\u3068XML\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u3068\u3066\u3082\u6271\u3044\u3084\u3059\u304f\u3001\u5927\u5909\u4fbf [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":31046,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2348],"tags":[15,671],"class_list":["post-31031","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-study","tag-cakephp","tag-json"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/31031\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/31031\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-27T11:18:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:44:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image18.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5\",\"datePublished\":\"2017-08-27T11:18:41+00:00\",\"dateModified\":\"2024-05-06T02:44:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031\"},\"wordCount\":180,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image18.jpg\",\"keywords\":[\"CakePHP\",\"json\"],\"articleSection\":[\"PHP\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031\",\"name\":\"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image18.jpg\",\"datePublished\":\"2017-08-27T11:18:41+00:00\",\"dateModified\":\"2024-05-06T02:44:43+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image18.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image18.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31031#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/31031","og_locale":"ja_JP","og_type":"article","og_title":"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/31031","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"2017-08-27T11:18:41+00:00","article_modified_time":"2024-05-06T02:44:43+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image18.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/31031#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/31031"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5","datePublished":"2017-08-27T11:18:41+00:00","dateModified":"2024-05-06T02:44:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/31031"},"wordCount":180,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/31031#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image18.jpg","keywords":["CakePHP","json"],"articleSection":["PHP\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/31031","url":"https:\/\/www.sejuku.net\/blog\/31031","name":"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/31031#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/31031#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image18.jpg","datePublished":"2017-08-27T11:18:41+00:00","dateModified":"2024-05-06T02:44:43+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/31031#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/31031"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/31031#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image18.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image18.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/31031#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010CakePHP\u5165\u9580\u3011JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/31031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=31031"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/31031\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/31046"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=31031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=31031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=31031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}