{"id":62290,"date":"2018-08-08T08:24:24","date_gmt":"2018-08-07T23:24:24","guid":{"rendered":"https:\/\/www.softantenna.com\/wp\/?p=62290"},"modified":"2018-08-08T08:24:24","modified_gmt":"2018-08-07T23:24:24","slug":"jid","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/jid\/","title":{"rendered":"jid - JSON\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30bf\u30eb\u306b\u691c\u7d22\u3067\u304d\u308b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2018\/08\/s_20180806_214531.jpg\" alt=\"S 20180806 214531\" title=\"s_20180806_214531.jpg\" border=\"0\" width=\"926\" height=\"609\" \/><\/p>\n<p>JSON\u3068\u306fJavaScript Object Notation\u306e\u7565\u3002\u305d\u306e\u540d\u524d\u306e\u901a\u308aJavaScript\u3068\u76f8\u6027\u304c\u826f\u304f\u3001\u8efd\u91cf\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6587\u3067\u3042\u308b\u3053\u3068\u304b\u3089\u6700\u8fd1\u3067\u306f\u3055\u307e\u3056\u307e\u306a\u5206\u91ce\u3067\u6d3b\u7528\u304c\u9032\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p>\u672c\u65e5\u7d39\u4ecb\u3059\u308b\u300c<a href=\"https:\/\/github.com\/simeji\/jid\">jid<\/a>\u300d\u306f\u3001\u3053\u306eJSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3067\u3059\u3002\u958b\u767a\u8005simeji\u6c0f\u306b\u3088\u3063\u3066\u3001Go\u8a00\u8a9e\u3067\u4f5c\u3089\u308c\u305f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30c4\u30fc\u30eb\u3067\u3001MIT\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u3082\u3068\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30b8\u30a7\u30b9\u30c8\u6a5f\u80fd\u3084\u81ea\u52d5\u88dc\u5b8c\u6a5f\u80fd\u3092\u642d\u8f09\u3057\u3001JSON\u306e\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u5177\u4f53\u7684\u306a\u4f7f\u7528\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>jid\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h2>\n<p>macOS\u306e\u5834\u5408Homebrew\u3092\u4f7f\u7528\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u3002<\/p>\n<pre>\nbrew install jid\n<\/pre>\n<p>\u4ed6\u306eOS\u306e\u5834\u5408\u306f\u3001<a href=\"https:\/\/github.com\/simeji\/jid\/releases\">GitHub<\/a>\u306e\u30ea\u30ea\u30fc\u30b9\u30da\u30fc\u30b8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3084\u3001\u300cgo get\u300d\u3067\u30d3\u30eb\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\ngo get -u github.com\/simeji\/jid\/cmd\/jid\n<\/pre>\n<h2>jid\u306e\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>jid\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u76f4\u611f\u7684\u306b\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u5b9f\u884c\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u3002<\/p>\n<pre>\necho '{\"aa\":\"2AA2\",\"bb\":{\"aaa\":[123,\"cccc\",[1,2]],\"c\":321}}'| jid\n<\/pre>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u4f8b\u3048\u3070\u300c.bb\u300d\u3068\u5165\u529b\u3059\u308b\u3068\u30ad\u30fc\u306e\"bb\"\u306b\u5bfe\u5fdc\u3057\u305f\u8981\u7d20\u306b\u7d5e\u308a\u8fbc\u307e\u308c\u3059\u3002<\/p>\n<pre>\n[Filter]> .bb\n{\n  \"aaa\": [\n     123,\n     \"cccc\",\n    [\n       1,\n       2\n    ]\n  ],\n  \"c\": 321\n}\n\n<\/pre>\n<p>\u3055\u3089\u306b\u7d9a\u3051\u3066\u300c.bb.aaa[2]\u300d\u3068\u3059\u308b\u3068\u3001\"bb\"\u306e\u5185\u90e8\u306e\"aaa\"\u306e2\u756a\u76ee\u306e\u8981\u7d20\u306b\u7d5e\u308a\u8fbc\u307e\u308c\u307e\u3059\u3002<\/p>\n<pre>[Filter]> .bb.aaa[2]\n[\n  1,\n  2\n]\n<\/pre>\n<p>Enter\u3092\u62bc\u3059\u3068[1,2]\u304c\u51fa\u529b\u3055\u308c\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<p>\u6a19\u6e96\u5165\u529b\u3001\u6a19\u6e96\u51fa\u529b\u3092\u6271\u3046\u306e\u3067UNIX\u306e\u4e00\u822c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070curl\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u60c5\u5831\u3092\u76f4\u63a5\u51e6\u7406\u3057\u305f\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u8aad\u307f\u8fbc\u3093\u3060\u308a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre>\ncurl -s http:\/\/rdg.afilias.info\/rdap\/domain\/example.info | jid\njid &lt; file.json\n<\/pre>\n<p>jid\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u304c\u6e96\u5099\u3055\u308c\u3066\u3044\u3066\u3001\u3055\u3089\u306b\u52b9\u7387\u826f\u304f\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002<\/p>\n<table>\n<tr>\n<th>\u30ad\u30fc<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>TAB \/ CTRL + I<\/td>\n<td>\u5229\u7528\u53ef\u80fd\u306a\u30a2\u30a4\u30c6\u30e0\u306e\u8868\u793a\u3068\u9078\u629e<\/td>\n<\/tr>\n<tr>\n<td>CTRL + W<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u76f4\u524d\u306e\u5358\u8a9e\u3092\u524a\u9664<\/td>\n<\/tr>\n<tr>\n<td>CTRL + U<\/td>\n<td>\u30af\u30a8\u30ea\u5168\u4f53\u3092\u524a\u9664<\/td>\n<\/tr>\n<tr>\n<td>CTRL + F(\u2192)<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u53f3\u306b<\/td>\n<\/tr>\n<tr>\n<td>CTRL + B(\u2190)<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u5de6\u306b<\/td>\n<\/tr>\n<tr>\n<td>CTRL + A<\/td>\n<td>\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u6700\u521d\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>CTRL + E<\/td>\n<td>\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u6700\u5f8c\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>CTRL + J<\/td>\n<td>JSON\u30d0\u30c3\u30d5\u30a1\u3092\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>CTRL + K<\/td>\n<td>JSON\u30d0\u30c3\u30d5\u30a1\u3092\u4e0a\u306b\u30b9\u30af\u30ed\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>CTRL + G<\/td>\n<td>JSON\u5834\u5408\u30d5\u30a1\u306e\u6700\u5f8c\u306b<\/td>\n<\/tr>\n<tr>\n<td>CTRL + L<\/td>\n<td>JSON\u30d0\u30c3\u30d5\u30a1\u306e\u5148\u982d\u306b<\/td>\n<\/tr>\n<tr>\n<td>CTRL + L<\/td>\n<td>JSON\u5168\u4f53\u307e\u305f\u306f\u30ad\u30fc\u306e\u30d3\u30e5\u30fc\u30e2\u30fc\u30c9\u5909\u66f4<\/td>\n<\/tr>\n<tr>\n<td>ESC<\/td>\n<td>\u5019\u88dc\u30dc\u30c3\u30af\u30b9\u3092\u975e\u8868\u793a\u306b<\/td>\n<\/tr>\n<\/table>\n<p>vi\u3084emacs\u3092\u5f77\u5f7f\u3068\u3055\u305b\u308b\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u304c\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u958b\u767a\u8005\u306a\u3089\u3070\u305d\u308c\u307b\u3069\u6238\u60d1\u3046\u3053\u3068\u306a\u304f\u4f7f\u7528\u3067\u304d\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u307e\u305fjig\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u6e96\u5099\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u8a73\u7d30\u306f\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>jid\u3092\u5229\u7528\u3059\u308c\u3070JSON\u30c7\u30fc\u30bf\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u52b9\u7387\u3088\u304f\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002UNIX\u30c4\u30fc\u30eb\u306e\u6d41\u5100\u306b\u306e\u3063\u3068\u3063\u3066\u4f5c\u3089\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u4ed6\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u67d4\u8edf\u306a\u904b\u7528\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JSON\u3068\u306fJavaScript Object Notation\u306e\u7565\u3002\u305d\u306e\u540d\u524d\u306e\u901a\u308aJavaScript\u3068\u76f8\u6027\u304c\u826f\u304f\u3001\u8efd\u91cf\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6587\u3067\u3042\u308b\u3053\u3068\u304b\u3089\u6700\u8fd1\u3067\u306f\u3055\u307e\u3056\u307e\u306a\u5206\u91ce\u3067\u6d3b\u7528\u304c\u9032\u3093\u3067\u3044\u307e\u3059\u3002 \u672c\u65e5\u7d39\u4ecb\u3059\u308b\u300cjid\u300d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":62317,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[3459],"tags":[3770],"class_list":["post-62290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-review","tag-json"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/62290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=62290"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/62290\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/62317"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=62290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=62290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=62290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}