{"id":2390,"date":"2009-11-06T11:53:27","date_gmt":"2009-11-06T02:53:27","guid":{"rendered":"http:\/\/clockmaker.jp\/blog\/?p=2390"},"modified":"2009-11-06T11:53:27","modified_gmt":"2009-11-06T02:53:27","slug":"actionscript-json","status":"publish","type":"post","link":"https:\/\/clockmaker.jp\/blog\/2009\/11\/actionscript-json\/","title":{"rendered":"ActionScript\u3067JSON\u3092\u6271\u3046\u65b9\u6cd5"},"content":{"rendered":"<p class=\"photo\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2400\" title=\"ActionScript 3.0 JSON\u5f62\u5f0f\" src=\"https:\/\/clockmaker.jp\/blog\/wp-content\/uploads\/2009\/11\/091106-json.png\" alt=\"ActionScript 3.0 JSON\u5f62\u5f0f\" width=\"460\" height=\"200\" \/><\/p>\n<p>\u5148\u65e5\u3001\u6614\u306e\u5f8c\u8f29\u304b\u3089JSON(\u30b8\u30a7\u30a4\u30bd\u30f3)\u306b\u3064\u3044\u3066\u6559\u3048\u3066\u6b32\u3057\u3044\u3068\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u3082\u3089\u3063\u305f\u306e\u3067\u3001JSON \u306e\u30e1\u30ea\u30c3\u30c8\u3068\u4f7f\u3044\u65b9(AS3)\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<h3>JSON\u3068\u306f\u4f55\u304b\uff1f<\/h3>\n<p>XML\u306e\u3088\u3046\u306b\u30c7\u30fc\u30bf\u3092\u6587\u5b57\u5217\u3067\u683c\u7d0d\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3002Flash\u306e\u5916\u90e8\u30c7\u30fc\u30bf\u306b\u306f\u4e00\u822c\u7684\u306b\u306fXML\u304c\u4f7f\u7528\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u304c\u3001JSON\u306fECMA\u6a19\u6e96\u306eObject\/Array\u5f62\u5f0f\u3067\u4fdd\u5b58\u3059\u308b\u305f\u3081\u3001\u89e3\u6790\u306e\u624b\u9593\u304c\u5c11\u306a\u304f\u6271\u3044\u3084\u3059\u3044\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>JSON\u306e\u30e1\u30ea\u30c3\u30c8<\/p>\n<ul>\n<li>EMCA\u6a19\u6e96\u306eObject\/Array\u5f62\u5f0f\u3067\u4fdd\u5b58\u3059\u308b\u305f\u3081\u3001\u89e3\u6790\u5f8c\u306e\u30c7\u30fc\u30bf\u304c\u6271\u3044\u3084\u3059\u3044<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u5bb9\u91cf\u304c\u5c11\u306a\u304f\u3066\u3059\u3080<\/li>\n<\/ul>\n<p>JSON\u306e\u30c7\u30e1\u30ea\u30c3\u30c8<\/p>\n<ul>\n<li>\u4eba\u304c\u8aad\u3093\u3067\u5206\u304b\u308a\u306b\u304f\u3044(\u624b\u66f4\u65b0\u3059\u308b\u306a\u3089XML\u306e\u307b\u3046\u304c\u3044\u3044\u304b\u3082)<\/li>\n<li>\u66f8\u5f0f\u304c\u6b63\u3057\u3044\u304b\u306e\u30c1\u30a7\u30c3\u30af\u304c\u9762\u5012(XML\u306a\u3089\u30d6\u30e9\u30a6\u30b6\u306b\u653e\u308a\u8fbc\u3081\u3070\u3001\u30d0\u30ea\u30c3\u30c9\u304b\u3069\u3046\u304b\u7c21\u5358\u306b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u3059)<\/li>\n<\/ul>\n<h3>ActionScript\u3067\u306e\u4f7f\u3044\u65b9<\/h3>\n<p>\u30e9\u30a4\u30d6\u30e9\u30ea\u300cas3corelib\u300d\u306bJSON\u5f62\u5f0f\u3078\u306e\u30c7\u30b3\u30fc\u30c0\u30fc\/\u30a8\u30f3\u30b3\u30fc\u30c0\u30fc\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><a title=\"as3corelib - Project Hosting on Google Code\" href=\"http:\/\/code.google.com\/p\/as3corelib\/\" target=\"_blank\">as3corelib &#8211; Project Hosting on Google Code<\/a><\/li>\n<\/ul>\n<p>\u30e9\u30a4\u30d6\u30e9\u30ea(\u300cas3corelib-.92.1.zip\u300d\u30d5\u30a1\u30a4\u30eb)\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001fla\u30d5\u30a1\u30a4\u30eb\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30d1\u30b9\u304c\u901a\u308b\u7b87\u6240\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u4e88\u3081\u6b21\u306e\u5185\u5bb9\u3092\u66f8\u304d\u8fbc\u3093\u3060JSON\u30c7\u30fc\u30bf\u3092\u3001\u300csample.json\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n[\n    {&quot;name&quot;:&quot;\u8d64\u7fbd \u4e00\u90ce&quot;, &quot;age&quot;:30},\n    {&quot;name&quot;:&quot;\u6771\u9280\u5ea7 \u4e8c\u90ce&quot;, &quot;age&quot;:24},\n    {&quot;name&quot;:&quot;\u79cb\u8449\u539f \u4e09\u90ce&quot;, &quot;age&quot;:41},\n    {&quot;name&quot;:&quot;\u8239\u6a4b \u56db\u90ce&quot;, &quot;age&quot;:25}\n]\n<\/pre>\n<p>fla\u306b\u306f\u3001\u30d5\u30ec\u30fc\u30e0\u30a2\u30af\u30b7\u30e7\u30f3\u306b\u6b21\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport com.adobe.serialization.json.*;\n\nvar l:URLLoader = new URLLoader();\nl.addEventListener(Event.COMPLETE, handler);\nl.load(new URLRequest(&quot;sample.json&quot;));\n\nfunction handler(e:Event):void{\n \/\/ \u8aad\u307f\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\n var str:String = l.data;\n\n \/\/ JSON\u30a8\u30f3\u30b3\u30fc\u30c0\u30fc\u3092\u5229\u7528\u3057\u3066Object\u578b\u306b\u5909\u63db\n var obj:Object = JSON.decode(str);\n\n \/\/ \u30c8\u30ec\u30fc\u30b9\u3059\u308b\n trace(obj);\n}\n<\/pre>\n<p>\u4e0a\u8a18\u3067\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3001obj\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4e2d\u306b\u5916\u90e8\u304b\u3089\u8aad\u307f\u8fbc\u307e\u308c\u305fJSON\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002obj\u306b\u306fObject\/Array\u306e\u5f62\u5f0f\u3067\u683c\u7d0d\u3055\u308c\u3066\u307e\u3059\u306e\u3067\u3001\u51fa\u529b\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n[object Object],[object Object],[object Object],[object Object]\n<\/pre>\n<p>\u4ee5\u4e0a\u3067\u8aad\u307f\u8fbc\u307f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u3064\u3044\u3067\u306b\u79c1\u304c\u666e\u6bb5\u5229\u7528\u3057\u3066\u3044\u308b\u4fbf\u5229TIPS\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u4e0a\u8a18\u306e\u307e\u307e\u3067\u306f\u78ba\u8a8d\u3057\u3065\u3089\u3044\u306e\u3067\u3001Progression\u3092\u5229\u7528\u3057\u3066\u30c8\u30ec\u30fc\u30b9\u3057\u3084\u3059\u3044\u5f62\u306b\u3057\u3066\u307f\u307e\u3059\u3002Progression\u306e\u4e2d\u306b\u3042\u308b<a href=\"http:\/\/asdoc.progression.jp\/jp\/nium\/utils\/ObjectUtil.html\" target=\"_blank\">ObjectUtil\u30af\u30e9\u30b9<\/a>\u3092\u5229\u7528\u3059\u308b\u3068\u3001Object\u5f62\u5f0f\u306e\u4e2d\u8eab\u3092\u8d70\u67fb\u3057\u3066\u6587\u5b57\u5217\u3068\u3057\u3066\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203bProgression\u306f<a href=\"http:\/\/progression.jp\/ja\/download\/\" target=\"_blank\">\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u306e\u3046\u3048\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u30d1\u30b9\u3092\u901a\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ \u30c8\u30ec\u30fc\u30b9\u3059\u308b (Progression\u306eObjectUtil\u3092\u4f7f\u3046\u3068\u30c8\u30ec\u30fc\u30b9\u304c\u4fbf\u5229)\nimport jp.nium.utils.*;\ntrace(ObjectUtil.toString(obj));\n<\/pre>\n<p>\u3059\u308b\u3068\u51fa\u529b\u7d50\u679c\u306f\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u3068\u306a\u308a\u4e2d\u8eab\u304c\u78ba\u8a8d\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n[{name:&quot;\u8d64\u7fbd \u4e00\u90ce&quot;, age:30}, {name:&quot;\u6771\u9280\u5ea7 \u4e8c\u90ce&quot;, age:24}, {name:&quot;\u79cb\u8449\u539f \u4e09\u90ce&quot;, age:41}, {name:&quot;\u8239\u6a4b \u56db\u90ce&quot;, age:25}]\n<\/pre>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u89e3\u8aac\u30b5\u30f3\u30d7\u30eb\u306f\u3053\u3061\u3089\u306b\u30a2\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u53c2\u8003\u306b\u3057\u305f\u3044\u65b9\u306f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/clockmaker.jp\/labs\/091106_json\/src.zip\">\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf<\/a>(CS3\/CS4\u5f62\u5f0f)<\/li>\n<\/ul>\n<h3>JSON\u30c7\u30fc\u30bf\u3092\u4f5c\u308b\u306b\u306f<\/h3>\n<p><a href=\"http:\/\/katamari.co.jp\/\">katamari\u3055\u3093<\/a>\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308bJSON\u7528\u306e\u30a8\u30c7\u30a3\u30bf\u30fc\u304c\u4fbf\u5229\u3067\u3059\u306e\u3067\u3001\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u4f5c\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li><a title=\"JSON Editor by katamari\" href=\"http:\/\/jsoneditor.net\/\" target=\"_blank\">JSON Editor by katamari<\/a><\/li>\n<\/ul>\n<p><a href=\"http:\/\/jsoneditor.net\/#air\" target=\"_blank\">Adobe AIR\u30a2\u30d7\u30ea\u7248<\/a>\u3082\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u5229\u7528\u3059\u308b\u3068\u4fbf\u5229\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3>\u78ba\u8a8d\u7528\u306e\u305f\u3081\u306e\u74b0\u5883<\/h3>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067json\u5f62\u5f0f\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3053\u306e\u307e\u307e\u3060\u3068\u78ba\u8a8d\u3059\u308b\u306e\u304c\u9762\u5012\u306a\u306e\u3067\u3001Firefox\u306b\u6b21\u306e\u30a2\u30c9\u30aa\u30f3\u3092\u5165\u308c\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\u3002Firefox\u306e\u30d6\u30e9\u30a6\u30b6\u4e0a\u3067JSON\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><a title=\"JSONView :: Add-ons for Firefox\" href=\"https:\/\/addons.mozilla.org\/ja\/firefox\/addon\/10869\" target=\"_blank\">JSONView :: Add-ons for Firefox<\/a><\/li>\n<\/ul>\n<h3>\u6700\u5f8c\u306b<\/h3>\n<p>\u3054\u4e0d\u660e\u306a\u70b9\u304c\u3042\u308a\u307e\u3044\u305f\u3089\u6c17\u8efd\u306b\u30b3\u30e1\u30f3\u30c8\u6b04\u306b\u3054\u6295\u7a3f\u304f\u3060\u3055\u3044\u307e\u305b\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5\u3001\u6614\u306e\u5f8c\u8f29\u304b\u3089JSON(\u30b8\u30a7\u30a4\u30bd\u30f3)\u306b\u3064\u3044\u3066\u6559\u3048\u3066\u6b32\u3057\u3044\u3068\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u3082\u3089\u3063\u305f\u306e\u3067\u3001JSON \u306e\u30e1\u30ea\u30c3\u30c8\u3068\u4f7f\u3044\u65b9(AS3)\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":2400,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/posts\/2390"}],"collection":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/comments?post=2390"}],"version-history":[{"count":0,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/posts\/2390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/media?parent=2390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/categories?post=2390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/tags?post=2390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}