jqã§ãã¼ã¿åæ awkã®ä»£æ¿ã¨ãã¦ã®jq ã³ãã³ãã©ã¤ã³ã§ã®ã¢ãããã¯æ§ãé«ãåæã¯æ代ã®å¤åã¨ã¨ãã«ãcsvããxml, æè¿ã¯msgpack, jsonãªã©ã®ãã¼ã¿ãã©ã¼ããããå©ç¨ããã¾ã jsonã¯ãã®çãç«ã¡ããè¨è¨ã»éçºããããã®ã§ã¯ãªããJavaScriptã®ãã¼ã¿ãã©ã¼ãããããå¶ç¶çºè¦ããããã®ã§ãã Apache HadoopãAWS EMRãGoogle Dataflow, Apache Beamãªã©ã§ä»»æã®ã·ãªã¢ã©ã¤ãºæ¹æ³ãå©ç¨ã§ãã¾ããããã®ä¸ã§ãå²ã¨ä¸è¬çãªæè¡ãjsonã§ãã ããã°ãã¼ã¿ã§å©ç¨ããã¦ããç¥è¦ããã¼ã«ã«ã§ãå©ç¨ã§ããä¸ã¤ã®æ段ã¨ãã¦jqã¨å¼ã°ããJavaScriptã®jsonãã©ã¼ãããå å·¥ã«æé©åãããã¤ã³ã¿ããªã¿ã¼ãå©ç¨ã§ãã¾ã ã³ã¼ãã®å ¨ä½ã¯ããã«ä¿åããã¦ããã®ã§ãé©å®åç §å©ç¨ãã¦ãã ãã jqã«csvãæå ¥ããåã«åå¦ç jqã ãã§
jq ã³ãã³ãã¨ã¯ http://stedolan.github.io/jq/ JSONããç°¡åã«å¤ãæãåºããããéè¨ããããæ´å½¢ãã¦è¡¨ç¤ºãããã§ããJSONç¨ã®grepã¨ãawkã¿ãããªã³ãã³ãã§ãã Webãµã¼ãã¹ãJSONãåããããAWS CLIã JSON ãåãããããç¾ä»£ç¤¾ä¼ã§å¤§å¤ä¾¿å©ãªã³ãã³ãã§ãã ããã¥ã¢ã« ã ãããããèªãã°OK. http://stedolan.github.io/jq/manual/ ããããã§ãçµãã£ã¦ãã¾ããã ãã©æ°ã«ããé²ãã¾ãã ç°¡åãªä¾ ã¾ãã空æ°ãã¤ãã¿ã¾ãããã 以ä¸jqã³ãã³ãã®è¨æ³ãè¦ã¦ããã¾ããJSON { "hoge": "value" } ããã£ãå ´åã . ãã«ã¼ã {} ã表ãã¾ãã.hoge 㧠"value" ã表ç¾ãã¾ããã ããããããªæãã§ãã ãã ã®æ´å½¢ ãã°ããä¸è¨ã®JSONãä¾ã«é²ãã¾ããitemsã«ã¯é
$ jq -h jq - commandline JSON processor [version 1.5] Usage: jq [options] <jq filter> [file...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. The simplest filter is ., which is the identity filter, copying jq's input to its output unmodified (except for formatting). For more advanced filters
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}