520kBããã¡ã¢ãªãç¡ãESP32ç°å¢ä¸ã®çµè¾¼ã¿Rustã§ã100kBå¼±ã®JSONãæ±ãããã«ãJSONã¹ããªã¼ã ãã¼ãµã¼ãä½ã£ãã話ã§ãã
520kBããã¡ã¢ãªãç¡ãESP32ç°å¢ä¸ã®çµè¾¼ã¿Rustã§ã100kBå¼±ã®JSONãæ±ãããã«ãJSONã¹ããªã¼ã ãã¼ãµã¼ãä½ã£ãã話ã§ãã
JSON ãè¡åä½ã«ããããããå±éãã¦ãããã³ãã³ã gron ããã³ãã¤ã³ãã§ã¨ã¦ãä¾¿å© 2022-06-13-1 [Programming] ã³ãã³ãã©ã¤ã³ã§ã® JSON ã®æä½ã«ã¯ jq (軽éJSONãã¼ãµ)[2017-10-24-1] ã使ã£ã¦ãã¾ããä¸è½ã§ä¾¿å©ãªãã§ããã奥ã¾ã£ãã¨ããã«ããå¤ã ããåãããã¨ãã¨ãã¡ãã£ã¨é¢åãªãã§ããããã¡ãã£ã¨å¤ãè¦ããã ããªã®ã«ããããã«ãªã£ã¡ãããã¡ã ã¨ãããã¨ã§ã gron ã¨ããã®ã使ã£ã¦ã¿ã¾ããã GitHub - tomnomnom/gron: Make JSON greppable!JSONãgrepããããããã³ãã³ãã©ã¤ã³ãã¼ã«gronã®ç´¹ä» - Qiitagronã§jsonã®æ±ãã楽ã«ãªã£ã話 â Tower of Engineers ããããã§ãããã ããããã顧客ï¼ï¼ç§ï¼ãæ¬å½ã«å¿ è¦ã ã£ããã®ãã ãã ä¾ãã°ã
JSON ã®å 容ã sed ã awk ã®ããã«ãã£ã«ã¿ã»å å·¥ããããã®ããã°ã©ã ã« jq ãããã JSON å½¢å¼ã§æä¾ããã¦ãã WebAPI ã®åºåãããã°ã®å 容ãæ±ãã®ã«ã¨ã¦ã便å©ã ãã®å¼·åãã®ä¸ç«¯ãç´¹ä»ãããã ã¤ã³ã¹ãã¼ã«ã¯ Mac OS X ã§ããã° Homebrew ãããå ¬å¼ãµã¤ããããã¤ããªããã¦ã³ãã¼ããããã¨ãã§ããã $ brew install jq ãµã³ãã«ç¨ã® JSON ãç¨æãã¦ããã $ cat << EOS > jsonfile {"name": "Foo", "sex": "Male", "age": 15, "emails": []} {"name": "Bar", "sex": "Male", "age": 20, "emails": ["[email protected]"]} {"name": "Baz", "sex": "Female", "
ãJSONãï¼ã¸ã§ã¤ã½ã³ï¼ã¯ã軽éã®ãã¼ã¿è¨è¿°ãã©ã¼ãããã¨ãã¦ããã¾ãã¾ãªã½ããã¦ã§ã¢éã§ã®ãã¼ã¿äº¤æã§åºã使ããã¦ãã¾ãã ãã¨ãã¨JSONã¯JavaScriptã®ãªãã¸ã§ã¯ã表è¨æ³ããã¼ã¹ã«Douglas Crockfordæ°ã2001å¹´é ã«âçºè¦âãï¼Crockfordæ°èªèº«ããJSONã¯ãã以åããåå¨ãã¦ãããç§ã¯çºè¦ããã ãã ãã¨ä¸»å¼µãã¦ããï¼ãå½åã2002å¹´ã«Crockfordæ°ãä½æããWebãµã¤ãjson.orgã§ä»æ§ãå ¬éããã¾ããã å½æã¯ãã¼ã¿äº¤æãã©ã¼ãããã¨ãã¦XMLã主æµã«ãªãã¨è¦ããã¦ãã¾ãããã軽éã§è¨è¿°ã解æã容æãªJSONã¯ç¾å¨ãXML以ä¸ã«åºã使ããããã¼ã¿ãã©ã¼ãããã«ãªã£ã¦ãã¾ãã ãã®JSONããJavaScriptã®æ¨æºåå£ä½ã§ãããECMA Internationalã§æ¨æºåãããä»æ§ææ¸ããECMA-404ãã¨ãã¦å ¬éãããã¨ãDou
while(1);[['u',[['smsSentFlag','false'],['hideInvitations','false'],['remindOnRespondedEventsOnly','true'],['hideInvitations_remindOnRespondedEventsOnly','false_true'],['Calendar ID stripped for privacy','false'],['smsVerifiedFlag','true']]]] ãã以å¤ã«ãGoogleã®ãµã¼ãã¹ã§ã¯ &&&START&&& ã¨ã while(1); &&&START&&& ã¦ã®ãå é ã«å ¥ã£ã¦ãããããã ãã©ãããã¯ä¸ä½ä½ï¼ 解ç ããã¯ã¯ãã¹ãµã¤ãã»ãªã¯ã¨ã¹ãã»ãã©ã¼ã¸ã§ãªå¯¾çã ä¾ãã°Googleã gmail.com/json?action=inbox ã¨ããURL
Twitterã®ã¹ãã¼ã¿ã¹IDã53bitãè¶ããã話 - tmytã®ãããã http://d.hatena.ne.jp/tmyt/20101201/1291166929 ããå¼ç¨ã ãã®ãã¡XMLã§å¦çãã¦ãå ´åã¯å é¨ã§64bit INTã§å¦çãã¦ããã°ç¹ã«åé¡ã¯èµ·ãã¾ããã ããããå¾®å¦ãªã¾ã¡ããããã¦ã人ã¯ãã®è¨äºæ¸ãã人ã ãã§ãªã大å¢ããããã ãã©ãè¨äºã¨ãã¦ã¯ã¾ã¨ã¾ã£ã¦ããã®ã§åç §ã JSON ã¨ããæ¸å¼ã¯ã確ãã« JavaScript ããæ´¾çãããµãã»ããã§ãã®ã§ã JSONãä»æ§æ¸éãã«ãã¼ã¹ããã¨idã®å¤ã¯double ã¨èãã¦ãã¾ãã®ãç¡çã¯ãªãæ°ã¯ãã¾ãã ããã¾ã¡ããã§ããã®ã確ãã§ãã RFC 4627 - The application/json Media Type for JavaScript Object Notation (JSON) http://t
JSONããã¼ã¿ã¨ããAjaxéä¿¡ã®å®é¨ããããã¨æã£ãã®ã§ãããAjaxé信以å¤ã«ä½ããããªãã®ã§ãAjaxã®ã¿ã®ã©ã¤ãã©ãªãæ¢ãã¦ã¿ã¾ããã ãããå¤ãï¼2010å¹´11æï¼ã®æ å ±ã§ãã次ã®è¨äºãè¦ã¤ãã¾ããã Ajax(XHR)å¦ãã«jQueryã¯ééã!!ãªæã®è»½éã©ã¤ãã©ãªé ããã§ç´¹ä»ããã¦ãã microajax - Tiny AJAX library ã¯ã»ãã¨ã«å°ããã©ã¤ãã©ãªã§ãããããåãè¨ãã¾ãã¦ãã¾ã£ãã®ãä¸ã«è²¼ãä»ããã½ã¼ã¹ã§ããè¥å¹²èªã¿ãããããã®ã¨ããã¤ãã£ãJSONãµãã¼ãã使ã£ã¦ã¿ãã¨ãããå¤æ´ç¹ã§ãã JavaScriptã§æ¸ãããJSONå¦çã©ã¤ãã©ãªãããã¤ãããã¾ãããä»ã§ã¯ãã©ã¦èªèº«ã JSON.parse(text) 㨠JSON.stringify(data) ããµãã¼ããã¦ãã¾ããå¤ããã©ã¦ã¶ã¸ã®èæ ®ãä¸è¦ãªãããã¤ãã£ãJSONã使ãã¨ã¹ã
å æ¥ã® fluent ã«å¼ãç¶ããæ°ããã½ããã¦ã§ã¢ã®ãªãªã¼ã¹ã§ãã æºãæãã¦ãMessagePack for Java 0.6 ããªãªã¼ã¹ãã¾ããï¼ 9ã¶æã¶ãã®ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ããã§ãã 以åã®ãã¼ã¸ã§ã³ 0.5 ã® API ããã¹ã¦è¦ç´ããäºææ§ãç¶æããªããããæ°å¤ãã®æ©è½ãæ°ãã«æè¼ãã¾ãããåçãªãã¸ã§ã¯ãAPI ã ãªãã¬ã¯ã·ã§ã³æ©è½ã®å¼·åãJRubyã¨ã®é£æºãJSONãµãã¼ã ãªã©ãªã©ããã¡ãããæ§è½ã大ããåä¸ãã¦ãã¾ãã ãã®ãã¼ã¸ã§ã³ 0.6 ã®ãªãªã¼ã¹ã«ãã£ã¦ãMessagePack ã®å¿ç¨ç¯å²ã¯å¤§ããåºããã¾ããMessagePackã¯ãã¯ã©ã¦ãã·ã¹ãã ããã¢ãã¤ã«ããã¤ã¹ããã¤ã¹ã¾ã§ãå¤ç¨®å¤æ§ãªã·ã¹ãã ã®é£æºã¨çµ±åããµãã¼ããããæ°ãããã¼ã¿è¡¨ç¾å½¢å¼ã§ãã ãã¦ãæ°æ©è½ã®è©³ç´°ãã覧ä¸ããï¼ JSONã·ãªã¢ã©ã¤ã¶ï½¥ãã·ãªã¢ã©ã¤ã¶ãçµ±å MessagePack
2018/7/1 éè¦ãªãç¥ãã JSONIC ã¯ãªãã¸ããªã GitHub ã«ç§»åãããã¨ã¨ãã«ãä»å¾æ©è½å¼·åãè¡ããããã¨ããªãã¡ã³ããã³ã¹ã¢ã¼ãã«ç§»è¡ãã¾ããJava æ°ãã¼ã¸ã§ã³ã§åä½ã§ããªããªã£ãå ´åã¸ã®å¯¾å¿ã¯è¦æãããã°èãã¾ãããå¯è½ã§ããã°ãæ©è½ãããã©ã¼ãã³ã¹å ±ã«åªãã jackson ã¸ã®ç§»è¡ããããããããã¾ãã JSONICã¨ã¯ JSONICã¯ãJavaç¨ã®ã·ã³ãã«ãã¤é«æ©è½ãªJSONã¨ã³ã³ã¼ãã¼/ãã³ã¼ãã¼ã©ã¤ãã©ãªã§ãã Javaç¨ã®JSONã©ã¤ãã©ãªã¯ãã§ã«å¤æ°åå¨ãã¾ãããJSONICã¯RFC 7159ã«å¾ã£ãæ£å¼ãªJSONå½¢å¼ã§ã®ãã³ã¼ã/ã¨ã³ã³ã¼ããè¡ããªããããããã°ã©ãã³ã°è¨èªã«ä¾åããæ å ±ãJSONå ã«å«ãããã¨ãªãPOJO(Plain Old Java Object)ã¨èªç¶ãªå¤æãè¡ããç¹ã«ç¹å¾´ãããã¾ãã 使ãæ¹ãé常ã«ç°¡åã§ãã import
åèªèº«ãåã®å¨è¾ºãJSONããã使ãã¾ããã§ããç´°ããç¹ã§ãã£ãããã¹ãããããã¦ãã¾ã(è¦ç¬)ããã®ã¨ã³ããªã¼ã§ãJSONã使ãä¸ã§æ³¨æãã¹ããã¨ï¼ééããããç¹ããã¹ã¦åæãã¾ãã å 容 å ¼ãã§ãã¯ãªã¹ãï¼ ä»æ§åå ¸ããèªãã°å®ç§ï¼ã®ã¯ãã ãï¼ æ°å¤ã®åã«ã¼ããä»ãã¦ã¯ãããªã 16é²æ°è¡¨è¨ãç¦æ¢ã ã æ°å¤ã®åã«ãã©ã¹ãä»ãã¦ã¯ãããªã å°æ°ç¹ããã¯ãã¾ãæ°å¤ã¯ãã¡ ç¨èªæ³ãéããï¼ããããã£ã¨ã¡ã³ãã¼ ã¡ã³ãã¼åã«ã¯å¸¸ã«æååã使ã 空æåå""ãã¡ã³ãã¼åã«ä½¿ãã é åè¦ç´ ã¯ããããªã¨ä¸¦ã¹ãã æååãå²ãã«ã¯äºéå¼ç¨ç¬¦ã ã æååå ã®ã¨ã¹ã±ã¼ããå¾®å¦ã«éã ä»æ§ã«ãªãã¨ã¹ã±ã¼ãã¯æ§æã¨ã©ã¼ undefinedãNaNãããã¾ãã ã©ããã¼ãªãã¸ã§ã¯ãã¯ä½¿ããªãã®ãå åã·ã¹ãã ã¨typeofã«é¢ãã注æ æå¾ã« ä»æ§åå ¸ããèªãã°å®ç§ï¼ã®ã¯ãã ãï¼ JSONã¯ãå°ããã¦ç°¡åãªä»æ§
JSON-libã®æ¦è¦ JSON-libã¯ãJavaãªãã¸ã§ã¯ãããJSONå½¢å¼ã®æååãçæãããããã®éã®å¦çãè¡ãJavaã©ã¤ãã©ãªã§ããAjaxã¢ããªã±ã¼ã·ã§ã³ã«ããã¦ãWebãã©ã¦ã¶ã§åä½ãã¦ããJavaScriptã®ããã°ã©ã ã¨ãµã¼ãå´ã®ããã°ã©ã ã¨ã®éã§ãªãã¸ã§ã¯ããããåãããéã«å©ç¨ã§ãã¾ããJARå½¢å¼ã®ãã¡ã¤ã«ãSourceForgeãããã¦ã³ãã¼ãå¯è½ã§ããã©ã¤ã»ã³ã¹ã¯The Apache Software License, Version 2.0ã§ãã JDK1.3ç¨(json-lib-1.1-jdk13.jar)ã¨JDK1.5ç¨(json-lib-1.1-jdk15.jar)ãããã¾ãã®ã§ã使ç¨ããJDKã®ãã¼ã¸ã§ã³ã«åã£ããã®ããã¦ã³ãã¼ããããã¡ã¤ã«ã®ãã¹ãã¯ã©ã¹ãã¹(CLASSPATH)ã«è¨å®ãã¦ãã ãããããã§ã¯JDK1.5ç¨ã«ããå®è¡ä¾ãç´¹ä»ãã¾ãã å®
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}