ãæ³¨æã ãã®ããã¥ã¡ã³ãã¯ãW3Cã®JSON-LD 1.1 Framing : An Extension to the Application Programming Interface for the JSON-LD Syntax W3C Recommendation 16 July 2020ã®å訳ã§ãã
ãã®ããã¥ã¡ã³ãã®æ£å¼çã¯W3Cã®ãµã¤ãä¸ã«ããè±èªçã§ããããã®ããã¥ã¡ã³ãã«ã¯ç¿»è¨³ã«èµ·å ãã誤ãããããã¾ãã誤訳ã誤æ¤ãªã©ã®ãææã¯ã訳è
ã¾ã§ãé¡ãè´ãã¾ãã
First Update: 2021å¹´8æ3æ¥
è¦ç´JSON-LDãã¬ã¼ã åã«ãããéçºè ã¯ä¾ãç¨ãã¦ã¯ã¨ãªãå®è¡ããJSON-LDããã¥ã¡ã³ãã«ç¹å®ã®ããªã¼ã»ã¬ã¤ã¢ã¦ããé©ç¨ããããã¨ãã§ãã¾ãã
ãã®ä»æ§ã§è¨è¿°ãã¦ããã®ã¯ãJSON-LDãã¬ã¼ã å1.0[JSON-LD10-FRAMING]ã§å®ç¾©ãã¦ããæ©è½ã®ä¸ä½éåã§ãããç¹ã«æè¨ãã¦ããªãéãããã®ä»æ§ã®ã¢ã«ã´ãªãºã ã¯ã以åã®ã³ãã¥ããã£æ¨æºãç¨ãã¦ä½æãããããã¥ã¡ã³ãã¨å®å ¨ã«äºææ§ãããã¾ãã
ãã®ããã¥ã¡ã³ãã®ã¹ãã¼ã¿ã¹ãã®é ã¯ããã®ããã¥ã¡ã³ãã®å ¬éæã®ã¹ãã¼ã¿ã¹ã«ã¤ãã¦è¨è¿°ãã¦ãã¾ããä»ã®ããã¥ã¡ã³ãããã®ããã¥ã¡ã³ãã«åã£ã¦ä»£ãããã¨ããããã¾ããç¾è¡ã®W3Cã®åè¡ç©ããã³ãã®æè¡å ±åã®ææ°ã®æ¹è¨çã®ãªã¹ãã¯ãhttps://www.w3.org/TR/ã®W3Cæè¡å ±åã¤ã³ããã¯ã¹ã«ããã¾ãã
ãã®ããã¥ã¡ã³ãã¯ãJSON-LDã¯ã¼ãã³ã°ã°ã«ã¼ãã«ãã£ã¦éçºãããJSON-LDã³ãã¥ããã£ã»ã°ã«ã¼ãã®æçµã¬ãã¼ãããæ´¾çãããã®ã§ãã
ãã®ããã¥ã¡ã³ãã§è¨è¿°ãã¦ããæ©è½ãå®è¨¼ã§ãã宿¼åJSON-LDãã¬ã¤ã°ã©ã¦ã³ããããã¾ãã
ãã®ããã¥ã¡ã³ãã¯ãJSON-LDã¯ã¼ãã³ã°ã°ã«ã¼ãã«ãã£ã¦å§åã¨ãã¦å ¬éããã¾ããã
ãã®ä»æ§ã®è°è«ã«ã¯GitHub Issuesããå§ããã¾ããã¾ãã¯ãã¡ã¼ãªã³ã°ã»ãªã¹ãã«ã³ã¡ã³ããéä¿¡ãããã¨ãã§ãã¾ããã³ã¡ã³ãã¯public-json-ld-wg@w3.org(ã¢ã¼ã«ã¤ã)ã«éä¿¡ãã¦ãã ããã
ã¯ã¼ãã³ã°ã°ã«ã¼ãã®å®è£ å ±åæ¸ãåç §ãã¦ãã ããã
ãã®ããã¥ã¡ã³ãã¯ãW3Cã¡ã³ãã¼ãã½ããã¦ã§ã¢éçºè ãä»ã®W3Cã°ã«ã¼ããããã³ä»ã®å©å®³é¢ä¿è ã«ããã¬ãã¥ã¼ãããW3Cå§åã¨ãã¦ç®¡çè ã®åè³ãå¾ã¾ãããããã¯ç¢ºå®æ¸ã¿ããã¥ã¡ã³ãã§ãããåèè³æã¨ãã¦ç¨ããããå¥ã®ããã¥ã¡ã³ãã§å¼ç¨ãããã¨ãã§ãã¾ããå§åã®ä½æã«ãããW3Cã®å½¹å²ã¯ã仿§ã«æ³¨æãå¼ãä»ããåºç¯å²ãªéçºãä¿é²ãããã¨ã§ããããã«ãã£ã¦ã¦ã§ãã®æ©è½æ§ããã³ç¸äºéç¨æ§ãå¢å¼·ããã¾ãã
ãã®ããã¥ã¡ã³ãã¯ãW3Cç¹è¨±æ¹éã®ä¸ã§æ´»åãã¦ããã°ã«ã¼ãã«ãã£ã¦ä½æããã¾ãããW3Cã¯ããã®ã°ã«ã¼ãã®ææç©ã«é¢é£ããããããç¹è¨±ã®é示ã®å ¬éãªã¹ããç¶æãããã®ãã¼ã¸ã«ã¯ç¹è¨±ã®é示ã«é¢ããæç¤ºãå«ã¾ãã¦ãã¾ããä¸å¯æ¬ ãªè«æ±æ¨©(Essential Claim(s))ãå«ãã§ããã¨æãããç¹è¨±ã«é¢ãã¦å®éã«ç¥ã£ã¦ãã人ã¯ãW3Cç¹è¨±æ¹éã®6é ã«å¾ã£ã¦æ å ±ãé示ããªããã°ãªãã¾ããã
ãã®ããã¥ã¡ã³ãã¯ã2019å¹´3æ1æ¥ã®W3Cããã»ã¹ã»ããã¥ã¡ã³ãã«ãã£ã¦ç®¡çããã¦ãã¾ãã
ããã¥ã¡ã³ãéåãã®ããã¥ã¡ã³ãã¯ãJSON-LDã¯ã¼ãã³ã°ã°ã«ã¼ãã使ããæ¬¡ã®3ã¤ã®JSON-LD 1.1å§åãã¡ã®1ã¤ã§ãã
ç®æ¬¡ãã®é ã¯éè¦ç¯çã§ãã
JSON-LDã¯ãJSON[RFC8259]ã§ãªã³ã¯ãã»ãã¼ã¿[LINKED-DATA]ãã·ãªã¢ã«åããããã®è»½ãæ§æã§ãããã®è¨è¨ã«ãããæ¢åã®JSONãæå°éã®å¤æ´ã§ãªã³ã¯ãã»ãã¼ã¿ã¨ãã¦è§£éã§ããããã«ãªãã¾ããæåã°ã©ããè¨è¿°ããä»ã®ãªã³ã¯ãã»ãã¼ã¿ã®è¡¨ç¾ã¨åæ§ã«ã1ã¤ã®æåã°ã©ãã¯ãã¾ã£ããåãæ å ±ã表ãå¤ãã®ç°ãªãã·ãªã¢ã«åã«ãªããã¾ããéçºè ã¯é常ãJSONãªãã¸ã§ã¯ãã¨ãã¦è¡¨ãããããªã¼ã§æä½ãè¡ãã¾ããã°ã©ããããªã¼ã«ãããã³ã°ãããã¨ã¯ã§ãã¾ãããæçµçµæã®ã¬ã¤ã¢ã¦ããäºåã«æå®ããå¿ è¦ãããã¾ãããã¬ã¼ã ãç¨ããã¨ãéçºè ã¯ãJSON-LDããã¥ã¡ã³ãä¸ã§ãã°ã©ãã®ç¢ºå®çãªã¬ã¤ã¢ã¦ããæå®ãããã¨ãã§ãã¾ãã
ãã¼ã¿ã®ãã£ã³ã¯ã®åå¾ã«åºåãè¨å·ãç¨ãããã¨ãããã¬ã¼ã åãã¨ããã¾ããJSON-LDã§ã¯ã{
ã¨}
ãªã©ã®JSONã®åºåãè¨å·ãç¨ãã¦ãç¹å®ã®ä¸»èªã«é¢ããã¹ãã¼ãã¡ã³ããåºåãã¾ããJSON-LDã§ã¯ã主èªã¯ãæååã¨ãã¦è¡¨ãããèå¥åãç¨ãã¦ä»ã®ä¸»èªãåç
§ãããã¨ãã§ãã¾ãã
ããããJSON-LDã¯1ã¤ä»¥ä¸ã®æ å ±ã®ã°ã©ãã表ããããããã¤ãã®é¢é£ãã主èªã«é¢ããã¹ãã¼ãã¡ã³ããã¾ã¨ãã¦1ã¤ã®ããã¥ã¡ã³ãã«ãã¬ã¼ã åããæ¹æ³ã¯è¤æ°ããã¾ããå®éãæ å ±ã®ã°ã©ãã¯ãã¾ã£ããæãããã¦ããªãç¬ç«ããé·ãã¹ãã¼ãã¡ã³ã(å¥åãããªãã«)ã®ãªã¹ãã¨èãããã¨ãã§ãã¾ãã
JSON-LDãã¬ã¼ã åAPIã«ãããéçºè
ã¯ãç¹å®ã®ä¸»èªã«é¢ããã¹ãã¼ãã¡ã³ãã{
ã¨}
ã§åºåã£ã¦æããããé¢é£ãã主èªããã¢ããªã±ã¼ã·ã§ã³ãæå¾
ãããã®ã¨ä¸è´ããç¹å®ã®ããªã¼æ§é ã«ãå
¥ãåãã«ãããªã©ããã¼ã¿ã®ãã¬ã¼ã åæ¹æ³ãæ£ç¢ºã«æå®ã§ãã¾ãã
ãã®é ã¯éè¦ç¯çã§ãã
ãã®ããã¥ã¡ã³ãã¯ããªã³ã¯ãã»ãã¼ã¿ãJSONã§ã·ãªã¢ã«åããããã®è©³ç´°ä»æ§ã§ãããã®ããã¥ã¡ã³ãã¯ãä¸»ã«æ¬¡ã®èªè ã対象ã¨ãã¦ãã¾ãã
é¢é£ããã¥ã¡ã³ãã§ããJSON-LD 1.1仿§[JSON-LD11]ã¯ãJSON-LDããã¥ã¡ã³ãã®ææ³ãè¦å®ãã¦ãã¾ãã
ãã®ä»æ§ã®åºæ¬ãçè§£ããããã«ã¯ãã¾ãã[RFC8259]ã§è©³ç´°ã«èª¬æããã¦ããJSONã«ç²¾éãã¦ããªããã°ãªãã¾ãããã¾ãããã®ããã¥ã¡ã³ãã®ãã¹ã¦ã®ã¢ã«ã´ãªãºã ã§ç¨ãã¦ããåºæ¬æ§æã§ããJSON-LD 1.1æ§æä»æ§[JSON-LD11]ã¨JSON-LD 1.1 API [JSON-LD11-API]ãçè§£ãã¦ããªããã°ãªãã¾ãããAPIã¨ããããããã°ã©ãã³ã°ç°å¢ã§ã©ã®ããã«åä½ãããã¨ãç®æãã¦ããã®ããçè§£ããããã«ã¯ãJavaScriptããã°ã©ãã³ã°è¨èª[ECMASCRIPT]ã¨WebIDL[WEBIDL]ã®å®ç¨çãªç¥èãããã¨ä¾¿å©ã§ããJSON-LDãRDFã«ãããã³ã°ããæ¹æ³ãçè§£ããããã«ã¯ãåºæ¬çãªRDFã®æ¦å¿µ[RDF11-CONCEPTS]ã«ç²¾éãã¦ããã¨å½¹ç«ã¡ã¾ãã
ãã®ããã¥ã¡ã³ãã§ã¯ãJSON-LD 1.0ãã¼ã¸ã§ã³ä»¥éã®å¤æ´ç¹ã強調表示ã§ãã¾ãã夿´ã®ã鏿ãã¦ãã ããã
1.2 è²¢ç®ãã®é ã¯éè¦ç¯çã§ãã
ãã®ä»æ§ã®éçºã«åå ãã¦ããã ããæ¹æ³ãããã¤ãããã¾ãã
ãã®é ã¯éè¦ç¯çã§ãã
ãã®ä»æ§ã§ã¯ã表è¨ã«é¢ãã¦æ¬¡ã®è¦å®ãç¨ãã¦ãã¾ãã
ãã¼ã¯ã¢ãã
å®ç¾©ã®åç
§ã®ãã¼ã¯ã¢ãã
å¤é¨å®ç¾©ã®åç
§ã®ãã¼ã¯ã¢ãã
注
注ã¯ãç·è²ã®å·¦æ ç·ã¨ç·è²ã®ã注ãã¨ããè¦åºããä»ããèç·è²ã®ããã¯ã¹ã«å ¥ã£ã¦ãã¾ããæ³¨ã¯å¸¸ã«åèæ å ±ã§ãã
Examples are in light khaki boxes, with khaki left border, and with a numbered "Example" header in khaki. Examples are always informative. The content of the example is in monospace font and may be syntax colored. Examples may have tabbed navigation buttons to show the results of transforming an example into other representations.1.4 ç¨èª
ãã®ããã¥ã¡ã³ãã§ã¯ãå¤é¨ä»æ§ã§å®ç¾©ããã¦ããæ¬¡ã®ç¨èªãç¨ããã¨ã¨ãã«ãJSON-LDåºæã®ç¨èªãå®ç¾©ãã¦ãã¾ãã
1.4.1 ã¢ã«ã´ãªãºã ã®ç¨èªæ¬¡ã®ç¨èªãç¹å®ã®ã¢ã«ã´ãªãºã å ã§ç¨ãã¾ãã
true
ã«ãreverseãã©ã°ã¯ããã©ã«ãã§false
ã«è¨å®ããã¾ãã
@graph
ã¨ã³ããªã¼å
ã«å«ããã®ããããã¨ãè¤æ°ã®ãã¼ãã»ãªãã¸ã§ã¯ãã表ãå¿
è¦ãããå ´åã«ã®ã¿å«ããã®ããæ±ºå®ãããã©ã°ã
ãã®ä»æ§ã§ã¯ãJSON-LD 1.1æ§æä»æ§[JSON-LD11]ã§å®ç¾©ããã¦ãããã®ã«ããã¤ãã®ãã¼ã¯ã¼ã(ãã¬ã¼ã åãã¼ã¯ã¼ã)ã追å ãã¦ãã¾ãã
@default
@embed
@embed
ã§æå¹ãªå¤ã¯æ¬¡ã®ã¨ããã§ãã
@always
@once
@embed
ããªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ãæå®ããã¦ããªãå ´åã¯ããããããã©ã«ãå¤ã§ãã
注
çµã¿è¾¼ããã¨ãé¸ã°ããç¹å®ã®
ãã¼ãã»ãªãã¸ã§ã¯ãã¯ãé åºã«ãã£ã¦ç°ãªãã¾ãã
ordered
ãã©ã°ã
true
ã§ããã°ãããã¯ãæåã«æ¤åºããã
ãã¼ãã»ãªãã¸ã§ã¯ãã«ãªãã§ãããããããã§ãªãå ´åã¯ãä»»æã®ãã¼ãã»ãªãã¸ã§ã¯ãã«ãªããã¾ãã
@never
@embed
ã«å¯¾ãããã®ä»ã®å¤ã¯ç¡å¹ã§ãããinvalid @embed value
ã¨ããã¨ã©ã¼ãæ¤åºããããã¨ã示ããå¦çã䏿¢ããã¾ãã
@explicit
@null
null
ã®å¤ãè¿ãã¹ãã§ããå ´åã«ãã¬ã¼ã åã§ç¨ãã¾ããããã§ãªãå ´åã¯ãç縮æã«åé¤ããã¾ãã
@omitDefault
@requireAll
ãã¹ã¦ã®JSON-LDã®ãã¼ã¯ã³ã¨ãã¼ã¯ã¼ãã¯ã大æåã¨å°æåãåºå¥ãã¾ãã
2. æ©è½ãã®é ã¯éè¦ç¯çã§ãã
JSON-LD 1.1ã§ã¯ãJSON-LD 1.0[JSON-LD10]ã¨äºææ§ã®ããæ°æ©è½ãå°å
¥ãã¦ãã¾ãããJSON-LD 1.0ããã»ããµã§å¦çããã¨ãç°ãªãçµæã使ãããå¯è½æ§ãããã¾ããããã»ããµã¯ãprocessingMode APIã®ãªãã·ã§ã³ãæç¤ºçã«json-ld-1.0
ã«è¨å®ããã¦ããªãéããjson-ld-1.1
ã«ããã©ã«ãè¨å®ããã¾ããå
¬éè
ã¯ãJSON-LD1.0ããã»ããµãJSON-LD 1.1ã®æ©è½ã誤ã£ã¦è§£éããªãããã«ã1.1
ã«è¨å®ãããã³ã³ããã¹ãå
ã§@version
ãããã»ã¨ã³ããªã¼ãç¨ãããã¨ããå§ããã¾ãã
ãã®é ã¯éè¦ç¯çã§ãã
JSON-LDããã¥ã¡ã³ãã®ãã¼ã¿ãæ´å½¢ããããã«ããã¬ã¼ã åãç¨ãããã©ããåããããã¼ã¿ãããããããããã¨ãçµæã¨ãã¦å¾ããããã¼ã¿ã®æ´å½¢æ¹æ³ã®ä¾ã示ãããã®ä¸¡æ¹ã«ãã¬ã¼ã ã»ããã¥ã¡ã³ãã®ä¾ãç¨ãã¾ãããããã³ã°ã¯ããã¬ã¼ã å ã«åå¨ããããããã£ã¼ãç¨ãã¦ãå ±éã®å¤ãå ±æãããã¼ã¿å ã®ãªãã¸ã§ã¯ããè¦ã¤ãããã¨ã«ãã£ã¦è¡ãªããã¾ãããããã³ã°ã¯ããã¬ã¼ã å ã«åå¨ãããã¹ã¦ã®ããããã£ã¼ãç¨ãããããã¬ã¼ã å ã®ä»»æã®ããããã£ã¼ãç¨ãããã®ããããã§è¡ããã¨ãã§ãã¾ãããããããããããã£ã¼å¤ãç¨ãã¦ãªãã¸ã§ã¯ããé£éããããã¨ã§ããªãã¸ã§ã¯ããäºãã«çµã¿è¾¼ããã¨ãã§ãã¾ãã
ãã¬ã¼ã ã«ã¯ã³ã³ããã¹ããå«ã¾ããããã¯ãçµæã¨ãã¦å¾ããããã¬ã¼ã åããåºåãç縮ããããã«ç¨ãã¾ãã
ä¾ãã°ã次ã®JSON-LDãã¬ã¼ã ãæ³å®ãã¦ã¿ã¾ãããã
ä¾2: ã©ã¤ãã©ãªã¼ã»ãã¬ã¼ã ã®ä¾{
"@context": {"@vocab": "http://example.org/"},
"@type": "Library",
"contains": {
"@type": "Book",
"contains": {
"@type": "Chapter"
}
}
}
ãã®ãã¬ã¼ã ã»ããã¥ã¡ã³ãã§ã¯ãLibraryã¨ããåã®ãªãã¸ã§ã¯ããä¸é¨ã«é ç½®ããcontainsããããã£ã¼ãç¨ãã¦ã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ãã«ãªã³ã¯ããBookã¨ããåã®ãªãã¸ã§ã¯ããããããã£ã¼å¤ã¨ãã¦çµã¿è¾¼ãã çµã¿è¾¼ã¿æ§é ãè¨è¿°ãã¦ãã¾ããã¾ããåç §ãã¦ããBookãªãã¸ã§ã¯ãå ã«ãChapterã¨ããåã®ãªãã¸ã§ã¯ãããBookãªãã¸ã§ã¯ãã®çµã¿è¾¼ã¿å¤ã¨ãã¦é ç½®ãã¦ãã¾ãã
ãã¬ã¼ã è¦ç´ ã«ããããããã©ããåããããªãã¸ã§ã¯ãã®éåãç¨ããå ´åã¯ã次ã®ã¨ããã§ãã
ä¾3: ãã©ããåãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {
"@vocab": "http://example.org/",
"contains": {"@type": "@id"}
},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": "http://example.org/library/the-republic"
}, {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": "http://example.org/library/the-republic#introduction"
}, {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}]
}
ãã¬ã¼ã ã»ã¢ã«ã´ãªãºã ã«ããããã¬ã¼ã ã®æ§é ã«å¾ã£ãæ°ããããã¥ã¡ã³ãã使ã§ãã¾ãã
ä¾4: ãã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
å¦çã¢ã¼ããjson-ld-1.0
ã§ãªãå ´åããã°ã©ãçç¥ãã©ã°ãtrue
ã§ããå ´åã¯ãæä¸ä½ã®@graph
ã¨ã³ããªã¼ãçç¥ã§ãã¾ãã
{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
ãã¬ã¼ã åã¢ã«ã´ãªãºã ã¯ãæåã«å
¥åãã¬ã¼ã ã¨ããã¥ã¡ã³ãã®ä¸¡æ¹ãå±éãããã¨ã«ãã£ã¦ãããè¡ãã¾ããæ¬¡ã«ããã©ããåããã主èªã®ãããã使ãã¾ãããã¬ã¼ã å
ã®æãå¤å´ã®ãã¼ãã»ãªãã¸ã§ã¯ãã¯ããããå
ã®ãªãã¸ã§ã¯ããããããããããã«ç¨ãã¾ãããã®ã±ã¼ã¹ã§ã¯ãLibrary
ã¨ãã@type
ãæã¡ããã®ããããã£ã¼ã®å¤ãããããããããã«å¥ã®ãã¬ã¼ã ãç¨ããcontains
ããããã£ã¼ãæã¤ãã¼ãã»ãªãã¸ã§ã¯ããæ¢ãã¾ããå
¥åããã¥ã¡ã³ãã«ã¯ããã®ãããªãã¼ãã»ãªãã¸ã§ã¯ãããã£ãã1ã¤ã ãå«ã¾ãã¦ãã¾ããcontainsã®å¤ã«ã¯ãã¼ãã»ãªãã¸ã§ã¯ãããããããã¯ãLibrary
ãªãã¸ã§ã¯ãã®contains
ã¨ããå¤ã§ãã主èªã®éåã«ããããããã¬ã¼ã ãªã©ã¨ãã¦æ±ããã¾ãã
ãã®é ã¯éè¦ç¯çã§ãã
åã§ã®ãããã³ã°ã«å ãã¦ããã¬ã¼ã ã¯1ã¤ä»¥ä¸ã®ããããã£ã¼ã§ããããã³ã°ãè¡ãã¾ãã
ä¾ãã°ã次ã®ãã¬ã¼ã ã¯ã@type
ã§ã¯ãªãããããã£ã¼å¤ã«åºã¥ãã¦ãªãã¸ã§ã¯ãã鏿ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "location": "Athens", "contains": { "title": "The Republic", "contains": { "title": "The Introduction" } } }
ããããã£ã¼å¤ã¯ãã¼ãã»ãªãã¸ã§ã¯ããã¨ã«ç°ãªããããããã«ããã@type
ã§é¸æããå ´åã¨åããã¬ã¼ã åã®çµæãçæããã¾ãã
{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
ãã¹ã¦ãå«ããã¼ãã»ãªãã¸ã§ã¯ãã®ãããã³ã°ãªã®ãããã®ãããªãªã¹ãåãããããããã£ã¼ã®ãããã³ã°ãªã®ãã®ãããã³ã°ã®å¶éæ¹æ³ã«ã¤ãã¦ã¯ã§ 2.3.5 ãã¹ã¦å¿ è¦ãã©ã°ãåç §ãã¦ãã ããã
2.1.2 ã¯ã¤ã«ãã«ã¼ãã»ãããã³ã°ãã®é ã¯éè¦ç¯çã§ãã
空ã®ããã({}
)ãwildcard
ã¨ãã¦ç¨ãã¾ããããã«ãããç¹å®ã®å¤ã«é¢ä¿ãªããã¿ã¼ã²ããã®ãã¼ãã»ãªãã¸ã§ã¯ãã«ããããã£ã¼ãåå¨ãã¦ããã°ããããã¾ãã
ä¾ãã°ã次ã®ãã¬ã¼ã ã¯ã@type
ã§ã¯ãªããããããã£ã¼ã®ã¯ã¤ã«ãã«ã¼ãã«åºã¥ãã¦ãªãã¸ã§ã¯ãã鏿ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "location": {}, "contains": { "creator": {}, "contains": { "description": {} } } }
ãããããããããã£ã¼ã¯åãã¼ãã»ãªãã¸ã§ã¯ãã«åºæã®ãã®ã§ãããããããã«ããã@type
ã§é¸æããå ´åã¨åããã¬ã¼ã åã®çµæãçæããã¾ãã
{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
2.1.3 ããããã£ã¼ã®ä¸å¨ã«ãããããã³ã°
ãã®é ã¯éè¦ç¯çã§ãã
空ã®é
å([]
)ãmatch none
ã«ç¨ãã¾ããããã«ãããããããã£ã¼ãã¿ã¼ã²ããã®ãã¼ãã»ãªãã¸ã§ã¯ãã«åå¨ããªãå ´åã«ã®ã¿ãã¼ãã»ãªãã¸ã§ã¯ãã«ããããã¾ãã
ä¾ãã°ã次ã®ãã¬ã¼ã ã¯ã@type
ã§ã¯ãªããããããã£ã¼ã®ä¸å¨ã«åºã¥ãã¦ãªãã¸ã§ã¯ãã鏿ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "creator": [], "title": [], "contains": { "location": [], "description": [], "contains": { "location": [] } } }
ããã«ããã@type
ã鏿ããå ´åã¨åããã¬ã¼ã åã®çµæãçæãããé¤å¤ãããããããã£ã¼ã¯åãã¼ãã»ãªãã¸ã§ã¯ãã䏿ã«èå¥ãã¾ããæç¤ºçã«é¤å¤ãããããããã£ã¼ã«ã¯ãnull
ã¨ããå¤ã®ããããã£ã¼ã追å ããããã¨ã«æ³¨æãã¦ãã ããã
{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"creator": null,
"title": null,
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"description": null,
"location": null,
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"location": null,
"title": "The Introduction"
}
}
}
2.1.4 å¤ã«ãããããã³ã°
ãã®é ã¯éè¦ç¯çã§ãã
ãã¬ã¼ã ã¯ãç¹å®ã®ããããã£ã¼å¤ã®åå¨ã«åºã¥ãã¦ãããããããã¨ãã§ãã¾ãããã®å¤èªä½ã¯wildcards
ãç¨ãã¦ãç¹å®ã¾ãã¯ä¸é£ã®å¤ãè¨èªã¿ã°ãåãåºæ¬æ¸åæ¹åã§ãããããããã¨ãã§ãã¾ãã
ä¾ã¨ãã¦ãããè¤éãªå¤ã®è¡¨ç¾ãæã¤å¤è¨èªãã¼ã¸ã§ã³ã®ã©ã¤ãã©ãªã¼ã®ä¾ãç¨ãã¾ãã
ä¾12: å¤è¨èªã®ã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {
"@vocab": "http://example.org/",
"contains": {"@type": "@id"}
},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"location": [
{"@value": "Athens", "@language": "en"},
{"@value": "Îθήνα", "@language": "grc"},
{"@value": "Athina", "@language": "el-Latn"}
],
"contains": "http://example.org/library/the-republic"
}, {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": [
{"@value": "Plato", "@language": "en"},
{"@value": "ΠλάÏÏν", "@language": "grc"},
{"@value": "Plátōn", "@language": "el-Latn"}
],
"title": [
{"@value": "The Republic", "@language": "en"},
{"@value": "ΠολιÏεία", "@language": "grc"},
{"@value": "Res Publica", "@language": "el-Latn"}
],
"contains": "http://example.org/library/the-republic#introduction"
}, {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}]
}
å¤ã®å±æ§ã§ãããã³ã°ãè¡ããã¨ã§ããã®å±æ§ãæã¤ãã¬ã¼ã ããããããããããããããããã£ã¼å¤ã«çµæãéå®ã§ãã¾ãããã®ã±ã¼ã¹ã§ã¯ãã©ãã³ååããã®ãªã·ã£èª(el-Latn
)ã«ãªã£ã¦ããå¤ã®ã¿ã§Libraryã¨Bookã®ãªãã¸ã§ã¯ãããã¬ã¼ã åãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "location": {"@value": {}, "@language": "el-Latn"}, "contains": { "creator": {"@value": {}, "@language": "el-Latn"}, "title": {"@value": {}, "@language": "el-Latn"}, "contains": { "title": "The Introduction" } } }
ããã«ãããæ¬¡ã®ãã¬ã¼ã åã®çµæãçæããã¾ãã
ä¾14: ã¯ã¤ã«ãã«ã¼ãã»ãããã³ã°ãç¨ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": {"@value": "Athina", "@language": "el-Latn"},
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": {"@value": "Plátōn", "@language": "el-Latn"},
"title": {"@value": "Res Publica", "@language": "el-Latn"},
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
2.1.5 @id
ã«ãããããã³ã°
ãã®é ã¯éè¦ç¯çã§ãã
ãã¬ã¼ã ã¯ãç¹å®ã®èå¥å(@id
)ã¨ä¸è´ããå ´åã«ããããããããã¨ãã§ãã¾ããããã¯ãç¹å®ã®@id
å¤ã«ããããããã¬ã¼ã ãç¨ãããå
ã®ãã©ããåãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ãã®å
¥åã§ä¾ç¤ºã§ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "contains": { "@id": "http://example.org/library/the-republic", "contains": { "@id": "http://example.org/library/the-republic#introduction" } } }
ããã«ãããæ¬¡ã®ãã¬ã¼ã åã®çµæãçæããã¾ãã
ä¾16: @idãããã³ã°ãç¨ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {
"@vocab": "http://example.org/"
},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
ãã¬ã¼ã ã¯ãèå¥åã®é
åãããããããããã¨ãã§ãã¾ãããã¬ã¼ã å
ã§ã¯ã@id
ã¯é
åå¤ãæã¤ãã¨ã許ããã¦ãã¾ãããã®å ´åãåã
ã®å¤ã¯IRIã¨ãã¦æ±ããã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@id": ["http://example.org/home", "http://example.org/library"], "contains": { "@id": ["http://example.org/library/the-republic"], "contains": { "@id": ["http://example.org/library/the-republic#introduction"] } } }
ããã«ãããæ¬¡ã®ãã¬ã¼ã åã®çµæãçæããã¾ãã
ä¾18: @idãããã³ã°ãç¨ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}
2.1.6 空ã®ãã¬ã¼ã
ãã®é ã¯éè¦ç¯çã§ãã
空ã®ãã¬ã¼ã ã¯ããã®ãªãã¸ã§ã¯ããä»ã®å ´æã§çµã¿è¾¼ã¾ãã¦ãã¦ããä»»æã®ãã¼ãã»ãªãã¸ã§ã¯ãã¨ããããããããæä¸ä½ã§ã·ãªã¢ã«åããã¾ãã
{ "@context": {"@vocab": "http://example.org/"} }
ããã«ãããæ¬¡ã®ãã¬ã¼ã åã®çµæãçæããã¾ãã
ä¾20: 空ã®ãã¬ã¼ã ãç¨ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{
"@context": {"@vocab": "http://example.org/"},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}, {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}, {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}]
}
2.2 ããã©ã«ãã®ã³ã³ãã³ã
ãã®é ã¯éè¦ç¯çã§ãã
ãã¬ã¼ã ã¯ãå
¥åãã¡ã¤ã«ã«åå¨ããªãããããã£ã¼ãæå®ã§ãã¾ããæç¤ºçãªå
å«ãã©ã°ãfalse
ã§ããã°ããã¬ã¼ã åã¢ã«ã´ãªãºã ã¯çµæã«ããããã£ã¼ã¨å¤ã追å ãã¾ãããã¼ãã»ãªãã¸ã§ã¯ããå¤ãªãã¸ã§ã¯ããã¾ãã¯@type
ã®å¤ã¨ãã¦ã®@default
ããããã£ã¼ã¯ãçµæã¨ãã¦å¾ãããåºåããã¥ã¡ã³ãã§ç¨ããããã©ã«ãå¤ãæä¾ãã¾ãã@default
ã¨ããå¤ããªããã°ãããããã£ã¼ã¯null
ã¨ããå¤ã§åºåããã¾ãã(ãããåé¿ããæ¹æ³ã«ã¤ãã¦ã¯ã§ 2.3.3 ããã©ã«ãçç¥ãã©ã°ãåç
§ãã¦ãã ãã)ã
注
ãã¬ã¼ã å ã®ããããã£ã¼ã®å¤ã¯ããã以å¤ã«ã¯åºåããã¥ã¡ã³ãã§ç¨ãããã¾ããããã®ç®çã¯ããã¬ã¼ã ã®ãããã³ã°ã¨ããã©ã«ãå¤ã®çºè¦ã§ããæ¬¡ã®ä¾ã®Libraryã®descriptionã®å¤ã«æ³¨ç®ãã¦ãã ããã
ä¾21: @defaultã¨ããå¤ãç¨ããã©ã¤ãã©ãªã¼ã»ãã¬ã¼ã ã®ä¾{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "description": "A great Library.", "contains": { "@type": "Book", "description": {"@default": "A great book."}, "contains": { "@type": "Chapter" } } }ä¾22: @defaultã¨ããå¤ãç¨ããã©ã¤ãã©ãªã¼åºåã®ä¾
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "description": null, "location": "Athens", "contains": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "description": "A great book.", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } }
ä»ã®ããããã£ã¼ã¨åæ§ã«ãããã©ã«ãå¤ã@type
ã«ç¨ãããã¨ãã§ãã¾ãããã®ã±ã¼ã¹ã§ã¯ã@type
ãªãã«ããããããã¼ãã»ãªãã¸ã§ã¯ãã¯ããã¬ã¼ã ããããã©ã«ãã»ãªãã¸ã§ã¯ãã®å¤ãåå¾ãã¾ããããã©ã«ãã»ãªãã¸ã§ã¯ãã¯ã1ã¤ã®IRIã§ããå¤ãæã¡ã¾ããè¤æ°ã®IRIãæå®ããã¦ããå ´åã¯ãæåã®IRIã®ã¿ãããã©ã«ãã®åã¨ãã¦ç¨ãããã¾ãã
ãã¬ã¼ã ã¯ç¹å®ã®ããããã£ã¼å¤ãæã¤ãªãã¸ã§ã¯ãã¨ãããããããããããªãã¸ã§ã¯ãã«@type
ã®ããã©ã«ããæä¾ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "contains": { "@type": {"@default": "Book"}, "creator": "Plato", "contains": { "@type": {"@default": "Chapter"}, "description": "An introductory chapter on The Republic." } } }
@type
ã«ç¹å®ã®å¤ãæ¬ è½ãã¦ããããä»ã®ããããã£ã¼å¤ã«åºã¥ãã¦ããããããã¼ã¿ã
{
"@context": {
"@vocab": "http://example.org/",
"contains": {"@type": "@id"}
},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"contains": "http://example.org/library/the-republic"
}, {
"@id": "http://example.org/library/the-republic",
"creator": "Plato",
"title": "The Republic",
"contains": "http://example.org/library/the-republic#introduction"
}, {
"@id": "http://example.org/library/the-republic#introduction",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}]
}
ä¾25: @defaultã¨ããåãç¨ããã©ã¤ãã©ãªã¼åºåã®ä¾
{ "@context": {"@vocab": "http://example.org/"}, "@graph": [{ "@id": "http://example.org/library", "@type": "Library", "contains": { "@id": "http://example.org/library/the-republic", "@type": "Book", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" }, "creator": "Plato", "description": "A great book.", "title": "The Republic" } }] }2.3 ãã¬ã¼ã åã®ãã©ã°
ãã®é ã¯éè¦ç¯çã§ãã
ãã¬ã¼ã åã¯ãAPIã®ãªãã·ã§ã³ãç¨ãããã§ 1.5 æ§æãã¼ã¯ã³ã¨ãã¼ã¯ã¼ãã§è¨è¿°ããã¦ããããã«ãã¬ã¼ã å ã«ãã¬ã¼ã åãã¼ã¯ã¼ãã追å ãããã¨ã§å¶å¾¡ã§ãã¾ãã
注
ãã¼ã¯ã¼ããç¨ãã¦è¨å®ããããã¬ã¼ã åã®ãã©ã°ã¯ããããåºç¾ãããã¬ã¼ã ã¨ããã¬ã¼ã ã»ãªãã¸ã§ã¯ããåå¨ããªããªãã¸ã§ã¯ãç¨ã«ä½æãããæé»çãªãã¬ã¼ã ã«å¯¾ãã¦ã®ã¿æå¹ã§ãã
2.3.1 ãªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ãã®é ã¯éè¦ç¯çã§ãã
ãªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã¯ãåç
§ããã¦ãããã¼ãã»ãªãã¸ã§ã¯ããåç
§ãªãã¸ã§ã¯ãã®ããããã£ã¼å¤ã¨ãã¦çµã¿è¾¼ããããã¼ãåç
§ã¨ãã¦ä¿æããããæ±ºå®ãã¾ãããªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã®åæå¤ã¯ã
ãªãã·ã§ã³ãç¨ãã¦è¨å®ãã¾ãããªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã®ããã©ã«ãã®embed
@once
å¤ã«åºã¥ã次ã®ãã¬ã¼ã ã«ã¤ãã¦èãã¦ã¿ã¦ãã ããã
{
"@context": {"@vocab": "http://example.org/"},
"@type": "Library"
}
ä¾27: @embedã@onceã«è¨å®ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "location": "Athens", "contains": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } }
(æç¤ºçãªå
å«ãã©ã°ãfalse
ã§ãããã¨ã«å ãã¦)ãªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã®ããã©ã«ãã¯@once
ã§ãããããåæããã¦ããªãããããã£ã¼ãåºåã«è¿½å ãããããã©ã«ãã®ç©ºã®ãã¬ã¼ã ãç¨ãã¦æé»çã«çµã¿è¾¼ã¾ãã¾ãããã®çµæã
ãã©ã°ãordered
true
ã§ããã¨ä»®å®ããã¨ãä¸è¨ã®ãã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã§ç¨ãããã¦ãããã®ã¨åãåºåãçæããã¾ãã
ãããã@embed
ããããã£ã¼ã@never
ã®å¤ã§æç¤ºçã«è¿½å ããã°ãBookã¨Chapterã®å¤ã¯é¤å¤ããã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "contains": { "@type": "Book", "@embed": "@never" } }ä¾29: @embedã@neverã«è¨å®ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "location": "Athens", "contains": { "@id": "http://example.org/library/the-republic" } }
@once
ãå¤ãå±éããªãã±ã¼ã¹ãä¾ç¤ºããããã«ãæ¬ãäºéã«ã¤ã³ããã¯ã¹åããã¦ããå¥ã®ã©ã¤ãã©ãªã¼ã®ä¾ã«ã¤ãã¦èãã¦ã¿ã¦ãã ããã
{
"@context": {
"@vocab": "http://example.org/",
"books": {"@type": "@id"},
"contains": {"@type": "@id"}
},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"books": "http://example.org/library/the-republic",
"contains": "http://example.org/library/the-republic"
}, {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": "http://example.org/library/the-republic#introduction"
}, {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}]
}
ä¾31: äºéã®ã¤ã³ããã¯ã¹ãç¨ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "contains": {"@id": "http://example.org/library/the-republic"}, "books": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } }
@once
ã¨ããããã©ã«ãã®@embed
ã§ãåããã¬ã¼ã ãç¨ãã¦ãã¬ã¼ã åããå ´åã
ãã©ã°ãordered
true
ã§ããã°ã"books"ããããã£ã¼ã®ã¿ãã³ã³ãã³ããæã¡ã"contains"ããããã£ã¼ã¯åç
§ãç¨ãã¾ãã
"@embed": "@always"
ãç¨ãããã¬ã¼ã ãç¨ããã°ã両æ¹ã®ããããã£ã¼ã«ã¯å±éãããå¤ãå«ã¾ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "@embed": "@always" }ä¾33: äºéã®ã¤ã³ããã¯ã¹ã¨@alwaysãç¨ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "books": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } }, "contains": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } }2.3.2 æç¤ºçãªå å«ãã©ã°
ãã®é ã¯éè¦ç¯çã§ãã
åºåããã¥ã¡ã³ãã«å«ã¾ããããããã£ã¼ã決å®ããããã«ç¨ããæç¤ºçãªå
å«ãã©ã°ãããã©ã«ãå¤ã¯false
ã§ãããã¯ãé¢é£ä»ãããã¦ãããã¬ã¼ã å
ã«ã¯ãªãå
¥åãã¼ãã»ãªãã¸ã§ã¯ãã«åå¨ããããããã£ã¼ãåºåãªãã¸ã§ã¯ãã«å«ã¾ãããã¨ãæå³ãã¾ããtrue
ã®å ´åã¯ãå
¥åãã¬ã¼ã ã«åå¨ããããããã£ã¼ã®ã¿ãåºåã«é
ç½®ããã¾ããæç¤ºçãªå
å«ãã©ã°ã®åæå¤ã¯ã
ãªãã·ã§ã³ãç¨ãã¦è¨å®ãã¾ããexplicit
ä¾ãã°ãå ¥åããã®ä¸é¨ã®ããããã£ã¼ã¯å«ã¾ãã¦ããããã©ãããã®ä»ã®ããããã£ã¼ã¯çç¥ããã¦ããã©ã¤ãã©ãªã¼ã»ãã¬ã¼ã ã®å±éãã¼ã¸ã§ã³ã«ã¤ãã¦èãã¦ã¿ã¦ãã ããã
ä¾34: @explicitãtrueã«è¨å®ããã©ã¤ãã©ãªã¼ã»ãã¬ã¼ã ã®ä¾{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "description": {}, "contains": { "@type": "Book", "@explicit": true, "title": {}, "contains": { "@type": "Chapter" } } }
çµæã¨ãã¦å¾ãããåºåã§ã¯ããã¬ã¼ã ã»ãªãã¸ã§ã¯ãã«æç¤ºçã«åæããã¦ããªãBookã®ããããã£ã¼ãé¤å¤ããã¾ãã
ä¾35: @explicitãtrueã«è¨å®ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "description": null , "location": "Athens", "contains": { "@id": "http://example.org/library/the-republic", "@type": "Book", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } }
Libraryãªãã¸ã§ã¯ãã«null
ã¨ããdescriptionããããã£ã¼ãå«ã¾ãã¦ãã¾ãããããã¯ã"description": {}
ãç¨ãã¦ãã¬ã¼ã å
ã§æç¤ºçã«å¼ã³åºããã¦ããããã§ãããã¨ã«æ³¨æãã¦ãã ãããcreatorããããã£ã¼ã¯ãæç¤ºçã§ã¯ãªããããåºåã«ã¯åå¨ãã¾ããã
ãã®é ã¯éè¦ç¯çã§ãã
ããã©ã«ãçç¥ãã©ã°ã¯ããã¬ã¼ã ã«è¨è¿°ããã¦ããããããã£ã¼ãå
¥åããã¥ã¡ã³ãã«åå¨ããªãå ´åã«ããã¬ã¼ã åãåºåãçæããæ¹æ³ã夿´ãã¾ããããã©ã«ãçç¥ãã©ã°ã®åæå¤ã¯ã
ãªãã·ã§ã³ãç¨ãã¦è¨å®ãã¾ãã詳細ã«ã¤ãã¦ã¯ã§ 2.2 ããã©ã«ãã®ã³ã³ãã³ããåç
§ãã¦ãã ãããomitDefault
次ã®å ¥åããã¥ã¡ã³ãã«ã¤ãã¦èãã¦ã¿ã¦ãã ããã
ä¾36: 親åé¢ä¿ãã¼ã¿ã®ä¾{ "@context": { "@vocab": "http://example.org/", "child": {"@type": "@id"} }, "@graph": [{ "@id": "http://example.org#John", "@type": "Person", "name": "John", "child": "http://example.org#Jane" }, { "@id": "http://example.org#Jane", "@type": "Person", "name": "Jane" }] }
ããã©ã«ãçç¥ãã©ã°ãæç¨ãªå ´åãä¾ç¤ºããããã«ã@omitDefault
ãç¨ããªã次ã®ãã¬ã¼ã ã«ã¤ãã¦èãã¦ã¿ã¦ãã ããã
{ "@context": { "@vocab": "http://example.org/", "child": {"@type": "@id"} }, "@type": "Person", "child": { "@embed": "@always" } }
çµæã¨ãã¦å¾ãããåºåã«ã¯ãå¤ãnull
ã®ãåãããããã£ã¼ãå«ã¾ãã¾ãããããã¯å¿
ãããæã¾ãããã®ã§ã¯ããã¾ããã
{ "@context": { "@vocab": "http://example.org/", "child": {"@type": "@id"} }, "@graph": [{ "@id": "http://example.org#John", "@type": "Person", "name": "John", "child": { "@id": "http://example.org#Jane", "@type": "Person", "name": "Jane" } }, { "@id": "http://example.org#Jane", "@type": "Person", "name": "Jane", "child": null }] }
"@embed": "@always"
ã¨ãããªãã·ã§ã³ãåããããã£ã¼ã®ä¸ã®ãã¬ã¼ã ã§æå®ããã¦ããããããã®"child": null
ãããã®ããããã£ã¼ãæããªããããã³ã°ã«å¯¾ããåºåã«åºç¾ãã¾ãããããã¯æã¾ãããªãå ´åããããã¨ã«æ³¨æãã¦ãã ããããã®ããã©ã«ãã®null
ã®åºåãçºçããªãããã«ããã«ã¯ã次ã®ããã«@omitDefault
ãtrueã«è¨å®ã§ãã¾ãã
{ "@context": { "@vocab": "http://example.org/", "child": {"@type": "@id"} }, "@type": "Person", "child": { "@embed": "@always", "@omitDefault": true } }
ããã«ãããæ¬¡ã®(æã¾ãã)åºåãå¾ããã¾ãã
ä¾40: @omitDefaultãç¨ãã親åé¢ä¿ã®åºåã®ä¾{ "@context": { "@vocab": "http://example.org/", "child": {"@type": "@id"} }, "@graph": [{ "@id": "http://example.org#John", "@type": "Person", "name": "John", "child": { "@id": "http://example.org#Jane", "@type": "Person", "name": "Jane" } }, { "@id": "http://example.org#Jane", "@type": "Person", "name": "Jane" }] }2.3.4 ã°ã©ãçç¥ãã©ã°
ãã®é ã¯éè¦ç¯çã§ãã
ã°ã©ãçç¥ãã©ã°ã¯ã1ã¤ã®ãã¼ãã»ãªãã¸ã§ã¯ããå«ãã§ãããã¬ã¼ã åãããåºåã@graph
å
ã«å«ããã©ãããæ±ºå®ãã¾ããã°ã©ãçç¥ãã©ã°ã®åæå¤ã¯ã
ã¨ãããªãã·ã§ã³ãç¨ããããå¦çã¢ã¼ãã«åºã¥ãã¦è¨å®ããã¾ããå¦çã¢ã¼ããomitGraph
json-ld-1.0
ã§ããã°ãåºåã«ã¯å¸¸ã«@graph
ã¨ã³ããªã¼ãå«ã¾ããããã§ãªãå ´åã¯ã@graph
ã¨ã³ããªã¼ã¯ãçç¸®ã¨æ´åçã«ãè¤æ°ã®ãã¼ãã»ãªãã¸ã§ã¯ããè¨è¿°ããããã«ã®ã¿ç¨ãããã¾ãã詳細ã«ã¤ãã¦ã¯ã§ 4.1 ãã¬ã¼ã åã¢ã«ã´ãªãºã ãåç
§ãã¦ãã ããã
çµæã¯å
ã®ãã©ããåããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ãã®ä¾ã¨åãã§ãããæä¸ä½ã«@graph
ãããã¾ããä¾5ã¯ãã°ã©ãçç¥ãã©ã°ãtrue
ã«è¨å®ããçµæã示ãã¦ãããããã¯ãå¦çã¢ã¼ããããã©ã«ãã®json-ld-1.1
ã«è¨å®ããã¦ããå ´åã®ããã©ã«ãå¤ã§ããå¦çã¢ã¼ããjson-ld-1.0
ã«è¨å®ããããã°ã©ãçç¥ãã©ã°ãfalse
ã«è¨å®ãããã¨ã§ãæä¸ä½ã®ãªãã¸ã§ã¯ãã@graph
ã§å²ããã¨ãã§ãã¾ãã
{
"@context": {"@vocab": "http://example.org/"},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
}
}
}]
}
2.3.5 ãã¹ã¦å¿
è¦ãã©ã°
ãã®é ã¯éè¦ç¯çã§ãã
ãã¹ã¦å¿
è¦ãã©ã°ã¯ãã©ã®ãããªå ´åã«å
¥åããã¥ã¡ã³ãã®ãã¼ãã»ãªãã¸ã§ã¯ãããã¬ã¼ã ã¨ãããããããæ±ºå®ããããã«ãã¬ã¼ã ã®ãããã³ã°ã§ç¨ãã¾ãããããã³ã°æã«ããªãã¸ã§ã¯ãã«ã¯@type
ãªã©ã®ããããã£ã¼ãå«ã¾ãã¦ããå ´åãããããã¹ã¦å¿
è¦ãã©ã°ã®å¤ãfalse
(ããã©ã«ã)ã§ããã°ããªãã¸ã§ã¯ãå
ã®ä»»æã®ããããã£ã¼å¤ããã¬ã¼ã ã»ãªãã¸ã§ã¯ãå
ã®node pattern
ã¨ãããããå ´åã«ãããã³ã°ãæç«ãã¾ãããã©ã°ã®å¤ãtrue
ã§ããã°ããã¼ãããããããããã«ã¯ããã¬ã¼ã ã»ãªãã¸ã§ã¯ãå
ã®ãã¹ã¦ã®ããããã£ã¼ããã¼ãã»ãªãã¸ã§ã¯ãã«åå¨ãã¦ããªããã°ãªãã¾ããã
次ã®ãã¬ã¼ã ã¯ãããããã£ã¼ã®ä¸å¨ãå«ãè¤æ°ã®ããããã£ã¼ã§ããããã¾ãããã©ããåãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ãã®ä¾ãç¨ããã¨ãã¿ã¤ãã«ã¨å
容è¨è¿°ã®ä¸¡æ¹ã¾ãã¯ã¿ã¤ãã«ã¨ä½æè
ã®ããããã£ã¼ãå«ããªãã¸ã§ã¯ãã§ãããã³ã°ãè¡ããã¨ãã§ãã¾ããfalse
ã«è¨å®ãã@requireAll
ãç¨ããã¨ããã¹ã¦ã®ããããã£ã¼ã®åå¨ã§ã¯ãªããä»»æã®ããããã£ã¼ã®åå¨ã«åºã¥ãã¦ãããã³ã°ãè¡ããã¨ãã§ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "contains": { "@requireAll": true, "creator": {}, "title": {}, "contains": { "@requireAll": true, "description": {}, "title": {} } } }
ããã«ãããåã³æã¾ãããã¬ã¼ã åãããåºåãåçããã¾ãã
ä¾43: @requireAllãtrueã«è¨å®ãããã¬ã¼ã åãããã©ã¤ãã©ãªã¼ã»ãªãã¸ã§ã¯ã{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "location": "Athens", "contains": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } }2.4 éãã¬ã¼ã å
ãã®é ã¯éè¦ç¯çã§ãã
ãã¬ã¼ã ã«ã¯ã@reverse
ãã¾ãã¯@reverse
ãç¨ãã¦å®ç¾©ããç¨èªã®å¤ãå«ãã¦ãåºåãªãã¸ã§ã¯ãã®é¢ä¿ãå転ããããã¨ãã§ãã¾ããä¾ãã°ãã©ã¤ãã©ãªã¼ã®ä¾ã¯ã次ã®ãã¬ã¼ã ãç¨ãã¦å転ã§ãã¾ãã
{ "@context": { "@vocab": "http://example.org/", "within": {"@reverse": "contains"} }, "@type": "Chapter", "within": { "@type": "Book", "within": { "@type": "Library" } } }
ä¸è¨ã®ãã©ããåãããã©ã¤ãã©ãªã¼ã®ä¾ãç¨ããã¨ã次ã®ãããªçµæã«ãªãã¾ãã
ä¾45: å転ãããã©ã¤ãã©ãªã¼åºå{
"@context": {
"@vocab": "http://example.org/",
"within": {"@reverse": "contains"}
},
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction",
"within": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"contains": {"@id": "http://example.org/library/the-republic#introduction"},
"creator": "Plato",
"title": "The Republic",
"within": {
"@id": "http://example.org/library",
"@type": "Library",
"location": "Athens",
"contains": {"@id": "http://example.org/library/the-republic"}
}
}
}
注
é常ã®ããããã£ã¼ã¨éã®ããããã£ã¼ã®éã«ã¯é対称æ§ãåå¨ãã¾ããé常ããã¼ãã»ãªãã¸ã§ã¯ãããã¬ã¼ã åããå ´åãæç¤ºçãªå å«ãã©ã°ãè¨å®ããã¦ããªããã°ããã¼ãã®ãã¹ã¦ã®ããããã£ã¼ãåºåã«å«ã¾ãã¾ãããéããããã£ã¼ã¯ãå®éã«ã¯ãã¼ãã®ããããã£ã¼ã§ã¯ãªããããå«ã¾ãã¾ããã
åºåã«éããããã£ã¼ãå«ããããã«ã¯ãããããã¬ã¼ã ã«æç¤ºçã«è¿½å ãã¾ããéã®é¢ä¿ãåå¨ããªãå ´åã¯ãã·ã³ãã«ã«åºåããé¤å¤ããããã¨ã«æ³¨æãã¦ãã ããã
2.5 ååä»ãã°ã©ãã®ãã¬ã¼ã åãã®é ã¯éè¦ç¯çã§ãã
ãã¬ã¼ã ã«@graph
ãå«ãããã¨ãã§ããããã«ãããJSON-LDããã¥ã¡ã³ãå
ã«å«ã¾ããååä»ãã°ã©ãã®æ
å ±ãé©åãªã°ã©ãã®ã³ã³ããã¹ãå
ã§å
¬éã§ãã¾ããããã©ã«ãã§ã¯ããã¬ã¼ã åã¯ãå
¥åå
ã®ãã¹ã¦ã®ã°ã©ãã®ãã¹ã¦ã®ãã¼ãã»ãªãã¸ã§ã¯ãã§æ§æãããmerged graph(çµ±åã°ã©ã)ãç¨ãã¾ãããã¬ã¼ã å
ã§@graph
ãç¨ãããã¨ã«ãããå
¥åããã¥ã¡ã³ãå
ã«å«ã¾ãã¦ããååä»ãã°ã©ãã®æ
å ±ãåºåããã¥ã¡ã³ãã«æç¢ºã«å«ãããã¨ãã§ãã¾ãã
次ã®ä¾ã§ã¯ãã©ã¤ãã©ãªã¼ã®ãã¼ãã®ããªã¨ã¼ã·ã§ã³ãç¨ãã¦ãããããã©ã«ãã®ã°ã©ãã¨http://example.org/graphs/books
ã¨ããååã®ã°ã©ãã¨ã«æ
å ±ãåå²ãã¦ãã¾ãã
{ "@context": {"@vocab": "http://example.org/"}, "@type": "Library", "contains": { "@id": "http://example.org/graphs/books", "@graph": { "@type": "Book" } } }ä¾47: ååä»ãã°ã©ããç¨ãããã©ããåãããå ¥å
[{
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/graphs/books",
"@graph": [{
"@id": "http://example.org/library/the-republic",
"@type": "http://example.org/Book",
"http://example.org/contains": {
"@id": "http://example.org/library/the-republic#introduction"
},
"http://example.org/creator": "Plato",
"http://example.org/title": "The Republic"
}, {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "http://example.org/Chapter",
"http://example.org/description": "An introductory chapter on The Republic.",
"http://example.org/title": "The Introduction"
}]
}, {
"@context": {"@vocab": "http://example.org/"},
"@id": "http://example.org/library",
"@type": "http://example.org/Library",
"http://example.org/contains": {"@id": "http://example.org/graphs/books"},
"http://example.org/name": "Library"
}]
ä¾48: ååä»ãã°ã©ããç¨ãããã¬ã¼ã åãããåºå
{ "@context": {"@vocab": "http://example.org/"}, "@id": "http://example.org/library", "@type": "Library", "name": "Library", "contains": { "@id": "http://example.org/graphs/books", "@graph": { "@id": "http://example.org/library/the-republic", "@type": "Book", "creator": "Plato", "title": "The Republic", "contains": { "@id": "http://example.org/library/the-republic#introduction", "@type": "Chapter", "description": "An introductory chapter on The Republic.", "title": "The Introduction" } } } }3. é©åæ§
éè¦ç¯çã¨è¨ãã¦ããé ã¨åããããã®ä»æ§ã®ãã¹ã¦ã®ä½æã¬ã¤ãã©ã¤ã³ãå³ãä¾ã注ã¯ãéè¦ç¯çã§ãããã®ä»æ§ã®ãã®ä»ã®é¨åã¯ãã¹ã¦è¦ç¯çã§ãã
ãã®ããã¥ã¡ã³ãã®ããããã¨ãã§ããï¼ãã¦ããã(MAY)ãããããªããã°ãªããªã(MUST)ããããã¦ã¯ãªããªã(MUST NOT)ããããã¹ãã§ããï¼ããå¿ è¦ããã(SHOULD)ããããã¹ãã§ãªãï¼ããå¿ è¦ããªã(SHOULD NOT)ãã¨ãããã¼ã¯ã¼ãã¯ãããã§ç¤ºãã¦ããããã«ããã¹ã¦å¤§æåã§è¡¨ç¤ºããã¦ããå ´åã«ã®ã¿ãBCP 14[RFC2119] [RFC8174]ã§è¨è¿°ããã¦ããããã«è§£éãããã¹ãã§ãã
ãã®ä»æ§ã¸ã®é©åæ§ã主張ã§ããã¬ãã«ã®ææç©ã1ã¤ããã¾ã: JSON-LDããã»ããµ
é©åJSON-LDããã»ããµã¯ããã®ä»æ§ã§å®ç¾©ãã¦ããã¢ã«ã´ãªãºã ã¨æ´åæ§ã®ããæ¹æ³ã§ãã¬ã¼ã åã®æä½ãå®è¡ã§ããã·ã¹ãã ã§ãã
JSON-LDããã»ããµã¯ã䏿£ãªå½¢å¼ã®IRIãè¨èªã¿ã°ãä¿®æ£ãããã¨ãã¦ã¯ãªãã¾ãã(MUST NOT)ãã妥彿§ã«é¢ããè¦åãåºããã¨ãã§ãã¾ã(MAY)ãIRIã«ã¯ãç¸å¯¾IRIã¨çµ¶å¯¾IRIã®éã®å¤æä»¥å¤ã®å¤æ´ã¯è¡ããã¾ããã
processingMode APIã®ãªãã·ã§ã³ãç¨ãã¦æå®ããã¦ããªãéããå¦çã¢ã¼ãã¯ãã¼ã«ã«ã»ã³ã³ããã¹ãã®@version
ã¨ã³ããªã¼ãç¨ãã¦è¨å®ãããå±éãç縮ãªã©ã®ã¢ã«ã´ãªãºã ã®åä½ã«å½±é¿ãä¸ãã¾ããä¸åº¦è¨å®ããã°ãç°ãªãå¦çã¢ã¼ãã«å¤æ´ãããã¨ããã¨ã¨ã©ã¼ã«ãªããããã»ããµã¯processing mode conflictã¨ã©ã¼ãçæãã¦ããã以éã®å¦çã¯ä¸æ¢ããªããã°ãªãã¾ãã(MUST)ã
ãã®ä»æ§ã®ã¢ã«ã´ãªãºã ã¯æ¦ãã¦ãå¹çãããæç¢ºããéè¦ãã¦è¨è¿°ãã¦ãã¾ãããããã£ã¦ãJSON-LDããã»ããµã¯ãæçµçãªçµæã仿§ã®ã¢ã«ã´ãªãºã ã«ãã£ã¦å¾ãããçµæã¨åºå¥ãã¤ããªããã®ã§ããéãããã®ä»æ§ã§æå®ãã¦ããã¢ã«ã´ãªãºã ãä»»æã®æã¾ããæ¹æ³ã§å®è£ ã§ãã¾ã(MAY)ã
ãã¼ã¯ã¼ãã®æä½ãè¨è¿°ããã¢ã«ã´ãªãºã ã®ã¹ãããã§ã¯ããã®ã¹ãããã¯ãã¼ã¯ã¼ãã®ã¨ã¤ãªã¢ã¹ã«ãé©ç¨ããã¾ãã
注
å®è£ è ã¯ãJSON-LDãã¬ã¼ã åãã¹ãã»ã¹ã¤ã¼ãã®ãã¹ãã»ã±ã¼ã¹ã«åæ ¼ãããã¨ã§ããã®ä»æ§ã¸ã®é©åã¬ãã«ãé¨åçã«ç¢ºèªã§ãã¾ãããããããã¹ãã»ã¹ã¤ã¼ãã®ãã¹ã¦ã®ãã¹ãã«åæ ¼ãã¦ãããã®ä»æ§ã«å®å ¨ã«æºæ ãã¦ããã¨ã¯éããªããã¨ã«æ³¨æãã¦ãã ãããããã¯ãå®è£ ããã¹ãã»ã¹ã¤ã¼ãã§ãã¹ããè¡ã£ãå´é¢ã«æºæ ãã¦ãããã¨ãæå³ããã ãã§ãã
4. ãã¬ã¼ã å以ä¸ã®é ã§ã¯ãJSON-LDããã¥ã¡ã³ãããã¬ã¼ã åããããã®ã¢ã«ã´ãªãºã ã«ã¤ãã¦èª¬æãã¾ãããã¬ã¼ã åã¯ãæ å ±ã®ã°ã©ãã表ãJSON-LDããã¥ã¡ã³ããåå¾ãã(ãã¬ã¼ã ã¨å¼ã°ãã)ç¹å®ã®ã°ã©ãã»ã¬ã¤ã¢ã¦ããé©ç¨ããããã»ã¹ã§ãã
ãã¬ã¼ã åã¯ããã¼ãã»ãããçæã¢ã«ã´ãªãºã ãç¨ãã¦ãJSON-LDããã¥ã¡ã³ãã§å®ç¾©ããã¦ããåãªãã¸ã§ã¯ãããã©ããåããã主èªã®ãããã«é ç½®ãããã¬ã¼ã åã¢ã«ã´ãªãºã ã§æä½ã§ããããã«ãã¾ãã
ãã®é ã§è¨è¿°ãã¦ãããã¹ã¦ã®ã¢ã«ã´ãªãºã ã¯ãè¨èªæ¬æ¥ã®ãã¼ã¿æ§é ã§åä½ãããã¨ãæå³ãã¦ãã¾ããã¤ã¾ããããã¹ãã»ãã¼ã¹ã®JSONããã¥ã¡ã³ãã¸ã®ã·ãªã¢ã«åã¯ããããã®ã¢ã«ã´ãªãºã ã¸ã®å ¥åãåºåã¨ãã¦ã¯å¿ è¦ããã¾ããã
JSONãã¼ã¿æ§é ã¸ã®åç §ã¯ãã¢ã«ã´ãªãºã ãè¨è¿°ããç®çã®ããã«ãå é¨è¡¨ç¾ãç¨ãã¦è§£éããã¾ãã
4.1 ãã¬ã¼ã åã¢ã«ã´ãªãºã 4.1.1 æ¦è¦æå¹ãªJSON-LDãã¬ã¼ã ã¯ãæå¹ãªJSON-LDããã¥ã¡ã³ãã®ä¸ä½éåã§ãããããã«ãã£ã¦è¿½å ã®ã³ã³ãã³ããå¯è½ã¨ãªããå±éãéãã¦ä¿åããã¾ããJSON-LD 1.1æ§æä»æ§[JSON-LD11]ã§å®ç¾©ããã¦ããææ³ã次ã®ããã«æ¡å¼µãã¦ãã¾ãã
@default
ã®å¤ã«ã¯ãIRIã«å±éãããã¨ã³ããªã»ãã¼ã®å¤ã®ææ³ã§è¨±ããã¦ãããã®ä»ã®å¤ã«å ãã¦ã@null
ã¨ããå¤ãã¾ãã¯@null
ã®ã¿ãå«ã¾ãã¦ããé
åãå«ããã¨ãã§ãã¾ã(MAY)ãããã»ããµã¯ãå±éæã«ãã®å¤ãä¿åããªããã°ãªãã¾ãã(MUST)ãããã©ã«ãã»ãªãã¸ã§ã¯ãã®ä»ã®ã¨ã³ããªã¼ã¯ãã¹ã¦ç¡è¦ããªããã°ãªãã¾ãã(MUST)ã@id
ã¨@type
ã®å¤ã¯ã空ã®ããããIRIåç
§ã空ã®ãããã®ã¿ãå«ã¾ãã¦ããé
åãã¾ãã¯IRIåç
§ã®é
åã§ããããã¾ãã@type
ã®å¤ã¯ã@default
ã¨ã³ããªã¼ãæã¤ãããã§ãããã(MAY)ããã®å¤ã¯IRIã«ãã£ã¦å¶éããã¾ããããã»ããµã¯ãå±éæã«ãã®å¤ãä¿åããªããã°ãªãã¾ãã(MUST)ã@graph
ã¨ã³ããªã¼ãå«ã¾ãã¦ãããã©ããã«å¿ãã¦ãå
¥åããã¥ã¡ã³ãã«å«ã¾ãã¦ããçµ±åããããã¼ãå®ç¾©ããããã©ã«ãã»ã°ã©ãã®ããããã§åä½ãã¾ãããã¬ã¼ã ã»ãªãã¸ã§ã¯ãã«@graph
ãå«ã¾ãã¦ããå ´åãååä»ãã°ã©ãã§ããã主èªãæã¤ãã¼ãã¯ãé¢é£ä»ãããã¦ããååä»ãã°ã©ããããã¼ãã»ãªãã¸ã§ã¯ãã«ãã¬ã¼ã åãæ¡å¼µãã¾ãããã¬ã¼ã åã¢ã«ã´ãªãºã ã¯ã5ã¤ã®å¿
é ã®å
¥å夿°ã¨1ã¤ã®ãªãã·ã§ã³ã®å
¥å夿°ãåãã¾ããå¿
é ã®å
¥åã¯ããã¬ã¼ã åã®ç¶æ
(state)ããã¬ã¼ã åããsubjectsã®ãªã¹ããå
¥åãã¬ã¼ã (expanded frame)ãé¨åçãªãã¬ã¼ã çµæã®åéã«ç¨ããparentãããã¦ãactive propertyã§ãããªãã·ã§ã³ã®å
¥å夿°ã¯
ãã©ã°ã§ããordered
ã¢ã«ã´ãªãºã ã¯ãè¦ç´ ãé
åã®å ´åã¯parentã«è¦ç´ ã追å ãããã¾ãã¯è¦ç´ ããããã®å ´åã¯parentã®active propertyã«é¢é£ä»ãããã¦ããé
åã«è¦ç´ ã追å ããã®ããããã«ãããè¦ç´ ãparentã«è¿½å ãã¾ããparentãé
åã§ããã°active propertyã¯null
ã§ãªããã°ãªãã(MUST)ããããã§ããã°null
ã§ãã£ã¦ã¯ãªããªã(MUST NOT)ãã¨ã«æ³¨æãã¦ãã ããã
invalid frame
ã¨ã©ã¼ãæ¤åºãããå¦çã䏿¢ããã¾ãã
@id
ã¨ã³ããªã¼ãããã°ããã®å¤ã¯ã1ã¤ã®ç©ºã®ããããå¤ã¨ãã¦å«ã¾ãã¦ããé
åãæå¹ãªIRIããã¹ã¦ã®å¤ãæå¹ãªIRIã§ããé
åã®ããããã§ãªããã°ãªãã¾ãã(MUST)ã@type
ã¨ã³ããªã¼ãããã°ããã®å¤ã¯ã1ã¤ã®ç©ºã®ããããå¤ã¨ãã¦å«ã¾ãã¦ããé
åããã¼ã@default
ã§ããã¨ã³ããªã¼ãæã¤ããããå«ã¾ãã¦ããé
åãæå¹ãªIRIããã¹ã¦ã®å¤ãæå¹ãªIRIã§ããé
åã®ããããã§ãªããã°ãªãã¾ãã(MUST)ã@embed
ã@explicit
ã@requireAll
ã®ä»»æã®ããããã£ã¼å¤ãã䏿¸ããã¾ããordered
ãã©ã°ãtrue
ã§ããã°ãidã§è¾æ¸é ã«ä¸¦ã¹ã¾ãã
@id
ã¨idãç¨ãã¦outputãæ°ãããããã«åæåãã¾ããfalse
ã§ãstateå
ã®graph nameã¨idã«é¢é£ä»ãããã¦ããparentã«æ¢åã®çµã¿è¾¼ã¿ãã¼ããããã°ããã®nodeã«ã¯è¿½å ã®å¦çãè¡ãã¾ãããtrue
ã§ãembedã@never
ã§ããããçµã¿è¾¼ã¿ã«ãã£ã¦å¾ªç°åç
§ã使ããããã®ããããã§ããã°ãoutputãparentã«è¿½å ãããã®nodeã«ã¯è¿½å ã®å¦çãè¡ãã¾ãããtrue
ã§ãembedã@once
ã§ãstateå
ã®graph nameã¨idã«é¢é£ä»ãããã¦ããparentã«æ¢åã®çµã¿è¾¼ã¿ãã¼ããããã°ãoutputãparentã«è¿½å ãããã®nodeã«ã¯è¿½å ã®å¦çãè¡ãã¾ããã@graph
ã¨ã³ããªã¼ããªããã°ãstateå
ã®graph nameã@merged
ã§ãªãå ´åã«recurseãtrue
ã«è¨å®ããsubframeãæ°ãã空ã®ãããã«è¨å®ãã¾ãã@graph
ã®æåã®ã¨ã³ããªã¼ãããããåå¨ãã¦ããªãå ´åã¯æ°ãã空ã®ãããã«è¨å®ããidã@merged
ã@default
ã§ãªãã°ãrecurseãtrue
ã«è¨å®ãã¾ããtrue
ã§ããã°ã
false
ã«è¨å®ãã¾ããfalse
ã«ãidã«é¢é£ä»ããããstateå
ã®graph mapããã®ãã¼ãsubjectsã¨ãã¦ãsubframeãframeã¨ãã¦ãoutputãparentã¨ãã¦ã@graph
ãactive propertyã¨ãã¦è¨å®ããstateã®ã³ãã¼ãç¨ãã¦ã¢ã«ã´ãªãºã ãå¼ã³åºãã¾ãã@included
ã¨ã³ããªã¼ãããã°ãçµã¿è¾¼ã¿ãã©ã°ã®å¤ãfalse
ã«ãsubjectsãframeãoutputãparentã¨ãã¦ã@included
ãactive propertyã¨ãã¦è¨å®ããstateã®ã³ãã¼ãç¨ãã¦ã¢ã«ã´ãªãºã ãå¼ã³åºãã¾ããordered
ãã©ã°ãtrue
ã§ããã°ãpropertyã§è¾æ¸é ã«ä¸¦ã¹ã¾ãã
true
ã§ããã°ã ããã»ããµã¯propertyã®å¤ãoutputã«è¿½å ãã¦ã¯ãªãã(MUST NOT)ãæ¬¡ã®ã¹ãããã¯ã¹ããããã¾ãã@list
ããããã£ã¼ãæã¤ãããã§ããã°ããªã¹ãå
ã®ålistitemã¯é ã«å¦çãããåºåã®æ°ãããªã¹ãã®ãããã«è¿½å ããã¾ãã
true
ã«ãlistitemã®@id
ã®å¤ãæ°ããsubjectsé
åã®å¯ä¸ã®ã¢ã¤ãã ã¨ãã¦ãframeå
ã®@list
ã®æåã®å¤ãframeã¨ãã¦ãlistãparentã¨ãã¦ã@list
ãactive propertyã¨ãã¦è¨å®ããstateã®ã³ãã¼ãç¨ãã¦ã¢ã«ã´ãªãºã ãå¼ã³åºãã¾ããframeãåå¨ãã¦ããªããã°ãembedãexplicitãrequireAllããåå¾ãã@embed
ã@explicit
ã@requireAll
ã«å¯¾ããããããã£ã¼ãæã¤æ°ããããããç¨ãã¦æ°ããframeã使ãã¾ãã@list
ã«è¿½å ãã¾ããtrue
ã«ãitemã®@id
ã®å¤ãæ°ããsubjectsé
åã®å¯ä¸ã®ã¢ã¤ãã ã¨ãã¦ãframeå
ã®propertyã®æåã®å¤ãframeã¨ãã¦ãoutputãparentã¨ãã¦ãpropertyãactive propertyã¨ãã¦è¨å®ããstateã®ã³ãã¼ãç¨ãã¦ã¢ã«ã´ãªãºã ãå¼ã³åºãã¾ããframeãåå¨ãã¦ããªããã°ãembedãexplicitãrequireAllããåå¾ãã@embed
ã@explicit
ã@requireAll
ã«å¯¾ããããããã£ã¼ãæã¤æ°ããããããç¨ãã¦æ°ããframeã使ãã¾ããtrue
ã§ãã@omitDefault
ãå«ã¾ãã¦ãããã@omitDefault
ãå«ã¾ãã¦ããããstateå
ã®ããã©ã«ãçç¥ãã©ã°ã®å¤ãtrue
ã§ããã°ãpropertyã¨property frameãã¹ããããã¾ãã@preserve
ããããã£ã¼ã¨ãåå¨ããå ´åã¯frameå
ã®@default
ã®å¤ã®ã³ãã¼ã§ããå¤ãã¾ãã¯ãããã§ãªãå ´åã¯@null
ã¨ããæååãæã¤æ°ããããããç¨ãã¦ãpropertyãoutputã«è¿½å ãã¾ãã@reverse
ããããã£ã¼ãããã°ãframeå
ã®@reverse
ã®å¤ã§ããreverse propertyã¨sub frameãã¨ã«ã
@reverse
ããããã£ã¼ã使ãã¾ãã@id
ã§ãããã¼ãåç
§ãå«ã¾ãã¦ããreverse propertyããããã£ã¼ãæã¤ãã©ããåããã主èªã®ãããå
ã®reverse idã¨nodeãã¨ã«ã
true
ã«ãreverse idãæ°ããsubjectsé
åã®å¯ä¸ã®ã¢ã¤ãã ã¨ãã¦ãsub frameãframeã¨ãã¦ãnull
ãactive propertyã¨ãã¦ãreverse dictå
ã®reverse propertyã®é
åã®å¤ãparentã¨ãã¦è¨å®ããstateã®ã³ãã¼ãç¨ãã¦ã¢ã«ã´ãªãºã ãå¼ã³åºãã¾ãããã¬ã¼ã ã»ãããã³ã°ã»ã¢ã«ã´ãªãºã ã¯ãç¹å®ã®ãã¼ãã»ãªãã¸ã§ã¯ãããã¬ã¼ã ã§è¨å®ããã¦ããåºæºã«ããããããã©ããã夿ããããã«ãã¬ã¼ã åã¢ã«ã´ãªãºã ã®ä¸é¨ã¨ãã¦ç¨ãã¾ããä¸è¬çã«ããã¼ãã»ãªãã¸ã§ã¯ãã¯ã@type
ã@id
ã§ã®ãããã³ã°ãæºããã°ãã¾ãã¯ãããã¤ãã®ç°ãªãããããã£ã¼ã®1ã¤ã«ãããããã°ããã¬ã¼ã ã«ããããã¾ãããã¹ã¦å¿
è¦ãã©ã°ãtrue
ã§ããã°ããã¹ã¦ã®ããããã£ã¼ã«ã¯ããã¬ã¼ã ããããããããã©ã«ãããããã³ã°ããªããã°ãªãã¾ããã
注
å±éããããã¼ãã»ãªãã¸ã§ã¯ãã§ãããã³ã°ãå®è¡ãããããããã¹ã¦ã®å¤ã¯é åã®å½¢å¼ã«ãªãã¾ãã
ãã¼ãã»ãããã³ã°ã§ã¯ãJSONæ§æåã®çµã¿åãããç¨ãã¦ãä»»æã®å¤ãã¼ããã¾ãã¯ããã¤ãã®ç¹å®ã®å¤ã«ãããã³ã°ãè¡ãã¾ãã
[]
(match none
)
[frame object]
(node pattern
)
[IRI+]
@type
ã¨@id
ã§ã®ãããã³ã°ã«ç¨ãããIRIå½¢å¼ã®1ã¤ä»¥ä¸ã®æååãããã«ãããåæããã¦ããIRIã®ããããã¨ã®ãããã³ã°ãå¯è½ã«ãªãã¾ãã
[value object]
(value pattern
)
@value
ã@type
ã@language
ã®å¤ã¯ã1ã¤ä»¥ä¸ã®æååã®å¤ã®é
åã§ããããã@language
ã®å¤ã¯å¤§æåã¨å°æåãåºå¥ããã«æ¯è¼ããã¾ãã
{}
(wildcard
)
ãã¬ã¼ã ã»ãããã³ã°ã»ã¢ã«ã´ãªãºã ã¯ããã¬ã¼ã åã®ç¶æ (state)ããã©ããåããã主èªã®ããããããããã³ã°ãè¡ã主èªã®ãªã¹ã(subjects)ããããã³ã°å¯¾è±¡ã®ãã¬ã¼ã (frame)ãããã³requireAllãã©ã°ãåããä¸è¨ã®ã¨ãããsubjectsã®ånodeããã£ã«ã¿ãªã³ã°ãããã¨ã§ããããã主èªã®ãªã¹ããè¿ãã¾ãã
@id
ã¨@type
ãå«ããã¹ã¦ã®ããããã£ã¼ããã ãããã¬ã¼ã ã®ãããã³ã°æã«ä»ã®ãã¼ã¯ã¼ãã¯èæ
®ããã¾ããã
@id
ã§ããã°ã
@id
ããããã£ã¼ã«valueså
ã®IRIãå«ã¾ãã¦ããã°ãpropertyã¯ããããã¾ãã@type
ããããã£ã¼ãwildcard
ãmatch none
ã§ããã°ãããããã£ã¼ã¯ããããã¾ããæ³¨
ãã¬ã¼ã åã¯
ãã©ããåããã主èªã®ãããã§æ©è½ãããã©ããåãè¡ããã¨ã«ãã£ã¦ããã¹ã¦ã®ä¸»èªã
@id
ããããã£ã¼ã確å®ã«æã¤ããã«ãªãã¾ãããããã£ã¦ã
"@id": []
ã¨ãããã¿ã¼ã³ã¯ãã©ã®
ãã¼ãã»ãªãã¸ã§ã¯ãã¨ãããããã¾ããã
"@id": [{}]
ã¨ãããã¿ã¼ã³ã¯ãä»»æã®
ãã¼ãã»ãªãã¸ã§ã¯ãã«ããããã
frameã§
@id
ããããã£ã¼ãã¾ã£ããæå®ããªãã®ã¨åçã§ãã
@type
ã§ããã°ã
@type
ããããã£ã¼ã«valueså
ã®IRIãå«ã¾ãã¦ããã°ãpropertyã¯ããããã¾ãã@type
ããããã£ã¼ãwildcard
ã§ããã°ãpropertyã¯ããããã¾ãã@type
ããããã£ã¼ãmatch none
ã§ããã°ãpropertyã¯ããããã¾ãã@type
ããããã£ã¼ãããã©ã«ãã»ãªãã¸ã§ã¯ãã§ããã°ãpropertyã¯ããããã¾ãã@id
ã@type
ã§ããããããªããã°ãnodeã¯ããããããå¦çã¯çµäºãã¾ãã@default
ã¨ã³ããªã¼ã®ã¿ãå«ã¾ãã¦ãããããã§ãããnodeå
ã®ãã®ä»ã®ããããã£ã¼ã«ã¯ããã©ã«ãã§ãªããããã³ã°ãããã¾ããmatch none
ã§ããã°ãnodeã¯ãããããããã以éã®ãããã³ã°ã¯ä¸æ¢ããã¾ããwildcard
ã§ããã°ãpropertyã¯ããããã¾ããvalue pattern
(value pattern)ã§ããã°ãããããã£ã¼ã®ãããã³ã°ã¯ãå¤ãããã³ã°ã»ã¢ã«ã´ãªãºã ãç¨ãã¦æ±ºå®ããã¾ããå¤ãã¿ã¼ã³ã»ãããã³ã°ã»ã¢ã«ã´ãªãºã ã¯ããã¬ã¼ã åããã³ãã¬ã¼ã ã»ãããã³ã°ã¢ã«ã´ãªãºã ã®ä¸é¨ã¨ãã¦ç¨ãã¾ããç¹å®ã®å¤ããå¤ãªãã¸ã§ã¯ãã®ããããã£ã¼ãã¨ã«é
åå½¢å¼ãç¨ãã¦å®ç¾©ãããå¤ã®éåã¨ãããã³ã°ã§ããããã«ãããã¨ã«å ãã¦ãå¤ãªãã¸ã§ã¯ãã¯ã@value
ã@type
ã@language
ã§
ã¨match none
ãç¨ãã¦å¤ãã¿ã¼ã³ã¨ããããã¾ããwildcard
ã¢ã«ã´ãªãºã ã¯ãvalue pattern
(pattern)ã¨å¤ãªãã¸ã§ã¯ã(value)ããã©ã¡ã¼ã¿ã¼ã¨ãã¦åãã¾ããå¤ã¯ã次ã®ã¢ã«ã´ãªãºã ãç¨ãã¦ãã¿ã¼ã³ã¨ããããã¾ãã
@value
ã@type
ã@language
ã®å¤ã¨ãããªã«ãåå¨ãã¦ããªããã°nullã¨ãã¾ãããã®å ´åã@language
ã®å¤ã¯å°æåã«æ£è¦åãã¾ãã@value
ã@type
ã@language
ã®å¤ã¨ãããªã«ãåå¨ãã¦ããªããã°nullã¨ãã¾ãããã®å ´åã@language
ã®æååã®å¤ã¯å°æåã«æ£è¦åãã¾ããwildcard
ã§ããã°ãvalueã¯patternã¨ããããã¾ããã¾ãã¯ã
wildcard
ã§ãããwildcard
ã§ããããnullã§ããããt1ãnull
ã§ããt2ãnullãmatch none
ã§ãããwildcard
ã§ããããnullã§ããããl1ãnull
ã§ããl2ãnullãmatch none
ã§ãããã®API(Application Programming Interface)ã¯ãéçºè ãJSON-LDãã¼ã¿ãæ§ã ãªããã°ã©ãã³ã°è¨èªã§å®¹æã«æ±ããæ§ã ãªåºåå½¢å¼ã«å¤æã§ããããã«ããã¯ãªã¼ã³ãªä»çµã¿ãæä¾ãã¾ããJSON-LD APIãããã°ã©ãã³ã°ç°å¢ã§æä¾ããå ´åã¯ã次ã®APIã®å ¨ä½ãå®è£ ããªããã°ãªãã¾ãã(MUST)ã
JSON-LD APIã¯ãPromisesãç¨ãã¦ãæ§ã ãªé å»¶æ¼ç®ã®çµæã表ãã¾ããPromisesã¯[ECMASCRIPT]ã§å®ç¾©ããã¦ãã¾ãã仿§å ã§ã®ä¸è¬çãªä½¿ç¨æ¹æ³ã¯ã[promises-guide]ã«ããã¾ããå®è£ ã¯ãä¸è¬çã«åãã¡ã½ããã弿°ããªãã·ã§ã³ãç¨ããåãçµæãè¿ãéãããã¤ãã£ããªç°å¢ã«é©ããæ¹æ³ã§å®è£ ãããã¨ã鏿ã§ãã¾ã(MAY)ã
注
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã«ã¯[Exposed=JsonLd]
ã¨è¨è¿°ãããããã«ãã£ã¦ã°ãã¼ãã«ãªã¤ã³ã¿ã¼ãã§ã¤ã¹ã使ããã¾ããJSON-LDã«ãããWebIDLã®ä½¿ç¨ã¯ããã©ã¦ã¶ã¼å
ã§ã®ä½¿ç¨ã«ã¯é©ãã¦ãã¾ããããã®ãããªä½¿ç¨ã«éå®ããã¦ã¯ãã¾ããã
JSON-LDããã»ããµã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¯ãéçºè ãJSON-LD夿ã¡ã½ããã«ã¢ã¯ã»ã¹ããããã«ç¨ãããã¤ã¬ãã«ãªããã°ã©ãã³ã°æ§é ã§ããä¸è¨ã®å®ç¾©ã¯ãJSON-LD 1.1 API[JSON-LD11-API]ã§å®ç¾©ããã¦ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®é¨çã«æ¡å¼µãããã®ã§ãã
å®è£
ãå
¥åãã©ã¡ã¼ã¿ã¼ã夿´ããªããã¨ã強調ãããã¨ã¯éè¦ã§ããã¨ã©ã¼ãæ¤åºãããã°ãPromise
ã¯é©åãª
ãæã¤code
JsonLdFramingError
ã§æå¦ãããå¦çã忢ãã¾ãã
[Global=JsonLd, Exposed=JsonLd
] interfaceJsonLd
{}; [Exposed=JsonLd
] interfaceJsonLdProcessor
{constructor
(); static Promise<JsonLdRecord
>frame
(JsonLdInput
input,JsonLdInput
frame, optionalJsonLdOptions
options = {}); };
JsonLdProcessor
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®frame()
ã¡ã½ããã¯ã次ã®ãã¬ã¼ã åã¢ã«ã´ãªãºã ã®ã¹ãããã«å¾ã£ã¦ããã¬ã¼ã ãç¨ãã¦æå®ãããinput
ããã¬ã¼ã åãã¾ãã
Promise
ã§ããpromiseã使ãããããè¿ãã¾ãããã®å¾ã次ã®ã¹ããããéåæã§å®è¡ããã¾ããordered
ãfalse
ã«è¨å®ãããªãã·ã§ã³ã«å¯¾ãã¦remote documentããªããã°ãexpanded inputãremote documentãå
¥åã®ããããã®å±éã¡ã½ãããç¨ããçµæã«è¨å®ãã¾ããtrue
ã«è¨å®ããordered
ãfalse
ã«è¨å®ããå
¥åãªãã·ã§ã³ã«remote frameããªããã°ãexpanded frameãremote frameãframeã®ããããã®å±éã¡ã½ãããç¨ããçµæã«è¨å®ãã¾ãã@context
ã®å¤ã«ãããã§ãªãå ´åã¯ãæ°ãã空ã®ã³ã³ããã¹ãã«è¨å®ãã¾ããdocumentUrl
ã«ãããã§ãªãå ´åã¯ããªãã·ã§ã³ããã®base
ã«è¨å®ãã¾ããnull
ã«è¨å®ãã¾ãã@graph
ã«å±éãããæä¸ä½ã®ããããã£ã¼ããã¬ã¼ã ã«ããã°ãframeDefault
ã¨ãããªãã·ã§ã³ãå¤ãtrue
ã§ãããªãã·ã§ã³ã«è¨å®ãã¾ãã@once
ã§ããembed
ã«è¨å®ãã¾ããfalse
ã«è¨å®ãã¾ããfalse
ã§ããexplicit
ã«è¨å®ãã¾ããfalse
ã§ããrequireAll
ã«è¨å®ãã¾ããfalse
ã§ããomitDefault
ã«è¨å®ãã¾ããframeDefault
ãtrue
ã§ããã°ãstateå
ã®graph nameã@default
ã«è¨å®ããããããã§ãªãå ´åã¯false
ã«è¨å®ãã¾ãã@merged
ã§ããã°ãgraph mapå
ã®@merged
ã®ã¨ã³ããªã¼ãããã¼ãã»ãããçµ±åã¢ã«ã´ãªãºã ãgraph mapãæ¸¡ããçµæã«è¿½å ãã¾ããnull
ãactive propertyã¨ãã¦æ¸¡ãã¾ããjson-ld-1.0
ã§ãªããã°ãã¨ã³ããªã¼ã®å¤ããçµæå
ã®ããããã£ã¼å¤ã«1åã ãç¾ãã空ç½ãã¼ãèå¥åã§ãããresultså
ã®åãã¼ãã»ãªãã¸ã§ã¯ãã®@id
ã¨ã³ããªã¼ãåé¤ãã¾ãã@preserve
ã§ããçµæã®ãã¹ã¦ã® ã¨ã³ããªã¼ãããã®ã¨ã³ããªã¼ã®æåã®å¤ã«ç½®ãæãã¾ãã
注
ã¨ã³ããªã¼ã®å¤ã¯ã1ã¤ã®å¤ãæã¤é
åã«ãªãã§ããããããã«ããã@preserve
ãå«ããããã广çã«ãã®å¤ã«ç½®ãæãããã¾ãã
null
ãelementã¨ãã¦ã®resultsããªãã·ã§ã³ããã®compactArrays
ã¨ordered
ãã©ã°ãç¨ãã¦compact
ã¡ã½ãããç¨ããçµæã«è¨å®ãã¾ãã
@graph
ã®IRIç縮ã®çµæã§ãããå¤ãcompacted resultsã§ãã1ã¤ã®ã¨ã³ããªã¼ãæã¤æ°ãããããã«ç½®ãæãã¾ãã@context
ã¨ã³ããªã¼ãcompacted resultsã«è¿½å ãããã®å¤ãæä¾ãããcontextã«è¨å®ãã¾ãã@null
ã¨ããå¤ãnull
ã«ç½®ãæãã¾ããç½®æå¾ã«ãé
åã«null
ã¨ããå¤ã®ã¿ãå«ã¾ãã¦ããã°ããã®å¤ãåé¤ãã¦ã空ã®é
åãæ®ãã¾ããomitGraph
ãfalse
ã§ãcompacted resultsã«æä¸ä½ã®@graph
ã¨ã³ããªã¼ããªããã¾ãã¯ãã®å¤ãé
åã§ãªãå ´åã¯ãcompacted resultsã®@context
ã§ãªãã¨ã³ããªã¼ãã@graph
ã®é
åã®å¤ã«å«ã¾ãã¦ãããããã«é
ç½®ããããã«å¤æ´ãã¾ããomitGraph
ãtrue
ã§ããã°ãæä¸ä½ã®@graph
ã¨ã³ããªã¼ã¯ãè¤æ°ã®ãã¼ãã»ãªãã¸ã§ã¯ããå«ãããã«ã®ã¿ç¨ãããã¾ããinput
ã®ãã¼ã¿ãåé
ç½®ããã¨ãã«ç¨ãããã¬ã¼ã ããããå½¢å¼ãIRIã¨ãã¦ã®ããããã
JsonLdOptions
ã¨ããåã¯ãããã©ã«ãã®ãªãã·ã§ã³ã®å¤ãå®ç¾©ãã¾ãã
typedef record<USVString, any> JsonLdRecord
;
JsonLdRecord
ã¯ãJSONãªãã¸ã§ã¯ãã®è§£æçµæã§ããä»»æã®ãããã»ã¨ã³ããªã¼ãå«ãããã«ç¨ãããããã®å®ç¾©ã§ãã
typedef (JsonLdRecord
or sequence<JsonLdRecord
> or USVString or RemoteDocument)JsonLdInput
;
JsonLdInput
ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯ãJsonLdRecord
ãJsonLdRecordsã®sequence
ãæå¹ãªJSONããã¥ã¡ã³ããåå¾ããããã«éåç
§ã§ããIRIã表ãæååãã¾ãã¯ãã§ã«éåç
§ããã¦ããRemoteDocumentãªã©ã®å
¥åå¤ãåç
§ããããã«ç¨ãã¾ãã
å¤ãJsonLdRecord
ã¾ãã¯JsonLdRecordsã®ã·ã¼ã±ã³ã¹ã§ããå ´åããã®å¤ã¯åçã®å
é¨è¡¨ç¾ã®å¤ã¨è¦ãªããããã®å ´åãJsonLdRecord
ã¯ãããã¨åçã§ãããJsonLdRecordsã®ã·ã¼ã±ã³ã¹ã¯ãããã®é
åã¨åçã§ãããããã»ã¨ã³ããªã¼ã¯ã[INFRA]ã§ããã¨åçã®ãã®ã«å¤æããã¾ãã
å¦çã¨ã©ã¼ãå ±åããããã«JsonLdFramingError
åãç¨ãã¾ãã
dictionaryJsonLdFramingError
{JsonLdFramingErrorCode
code
; USVString?message
= null; }; enumJsonLdFramingErrorCode
{ "invalid frame
", "invalid @embed value
" };
JSON-LDãã¬ã¼ã åã¯ãJSON-LD 1.1å¦çã¢ã«ã´ãªãºã ã¨API[JSON-LD11-API]ã§å®ç¾©ããã¦ããã¨ã©ã¼ã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¨ã³ã¼ããæ¡å¼µãã¦ãã¾ãã
code
message
JsonLdFramingErrorCode
ã¯ãæå¹ãªJSON-LDãã¬ã¼ã åã¨ã©ã¼ã»ã³ã¼ãã®ã³ã¬ã¯ã·ã§ã³ã表ãã¾ãã
invalid @embed value
@embed
ã®å¤ã¯ããªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã«å¯¾ãã¦èªèãããå¤ã§ã¯ããã¾ããã
invalid frame
ãã®é ã§ã¯ãJSON-LDAPIå ã§ç¨ãããã¼ã¿åã®å®ç¾©ã«ã¤ãã¦èª¬æãã¾ãã
5.3.1 JsonLdContextJsonLdContextåã¯ãããããIRIã表ãæååãã¾ãã¯ãããã¨æååã®é åã§ããããå¤ãåç §ããããã«ç¨ãã¾ãã
JSON-LD 1.1 API[JSON-LD11-API]ã®JsonLdContextã®å®ç¾©ãåç §ãã¦ãã ããã
5.3.2 JsonLdOptionsJsonLdOptions
åã¯ãæ§ã
ãªãªãã·ã§ã³ãJsonLdProcessor
ã¡ã½ããã«æ¸¡ãããã«ç¨ãã¾ãã
dictionaryJsonLdOptions
{ (JsonLdEmbed
or boolean)embed
= "@once"; booleanexplicit
= false; booleanomitDefault
= false; booleanomitGraph
; booleanrequireAll
= false; booleanframeDefault
= false; booleanordered
= false; }; enumJsonLdEmbed
{ "@always
", "@once
", "@never
" };
JSON-LD 1.1 API[JSON-LD11-API]ã§å®ç¾©ããã¦ãããªãã·ã§ã³ã«å ãã¦ããã¬ã¼ã åã§ã¯æ¬¡ã®è¿½å ãªãã·ã§ã³ãå®ç¾©ãã¦ãã¾ãã
embed
true
ã¨ãããã¼ã«å¤ã¯ããã©ã°ã@once
ã«è¨å®ããfalse
ã¨ããå¤ã¯ãã©ã°ã@never
ã«è¨å®ãã¾ãã
explicit
frameDefault
omitDefault
omitGraph
json-ld-1.0
ã®å ´åã¯false
ã«ãããã§ãªãå ´åã¯true
ã«è¨å®ããã¾ãã
ordered
true
ã«è¨å®ããã¦ããã°ãæç¤ºããã¦ããç¹å®ã®ã¢ã«ã´ãªãºã å¦çã¹ãããã¯è¾æ¸é ã«ãªãã¾ããfalse
ã§ããã°ãå¦çã«ããã¦é åºã¯èæ
®ããã¾ããã
requireAll
JsonLdEmbed
ã¯ã次ã®
ãªãã·ã§ã³ã®å¤ãåæãã¾ããembed
@always
@never
@once
@embed
ã¨ãªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã®ããããæå®ããã¦ããªããã°ããããããã©ã«ãå¤ã§ãã
JSON-LD 1.1 API[JSON-LD11-API]ã®JsonLdOptionså®ç¾©ãåç §ãã¦ãã ããã
6. ã»ãã¥ãªãã£ã«é¢ããçæç¹Â§ A. IANAã«é¢ããçæç¹ã®ã»ãã¥ãªãã£ã«é¢ããçæç¹ãåç §ãã¦ãã ããã
7. ãã©ã¤ãã·ã¼ã«é¢ããçæç¹[JSON-LD11]ã®ãã©ã¤ãã·ã¼ã«é¢ããçæç¹ãåç §ãã¦ãã ããã
8. å½éåã«é¢ããçæç¹[JSON-LD11]ã®å½éåã«é¢ããçæç¹ãåç §ãã¦ãã ããã
A. IANAã«é¢ããçæç¹ãã®é ã¯ãæ¨æºã³ãã¥ããã£ã®ã¬ãã¥ã¼ã®ããã ãã«å«ã¾ãã¦ããããã®ä»æ§ãW3Cå§åã«ãªãã°ãã¤ã³ã¿ã¼ãããæè¡éå¶å§å¡ä¼ã«æåºããã¾ãã
JSON-LDãã¬ã¼ã ã¯ã[JSON-LD11]ã§è¨è¿°ããã¦ãããã®ã¨åãMIMEã¡ãã£ã¢ã»ã¿ã¤ãã¨ãå¿
é profile
ãã©ã¡ã¼ã¿ãç¨ãã¾ãã
profile
è³æºãJSON-LDãã¬ã¼ã ã¨ãã¦èå¥ãã1ã¤ã®URIããããã¡ã¤ã«ã¯ããããã¡ã¤ã«ã®ç¥èãªãã«å¦çãããå ´åã«è³æºã®è¡¨ç¾ã®ã»ãã³ãã£ã¯ã¹ã夿´ããªãããããããã¡ã¤ã«å¯¾è±¡ã®è³æºã«é¢ãã¦ã¯ã©ã¤ã¢ã³ããç¥èãæã£ã¦ãã¦ãããªãã¦ãåã表ç¾ãå®å ¨ã«ä½¿ç¨ã§ãã¾ãã
http://www.w3.org/ns/json-ld#framed
JSON-LDãã¬ã¼ã ã»ããã¥ã¡ã³ããæä¾ããã³ãªã¯ã¨ã¹ãããéã«ã¯ãhttp://www.w3.org/ns/json-ld#framed
ãç¨ããã¹ãã§ã(SHOULD)ã
JSON-LDã¯æåã°ã©ãã®ç´ç²ãªãã¼ã¿äº¤æãã©ã¼ãããã§ãããã¨ãæå³ãã¦ãããããã·ãªã¢ã«åã¯ãè§£æç¨ã®JavaScriptã®eval()
颿°ãªã©ã®ã³ã¼ãå®è¡ã¡ã«ããºã ãéãã¹ãã§ã¯ããã¾ãã(SHOULD NOT)ã(ç¡å¹ãª)ããã¥ã¡ã³ãã«ã¯ãå®è¡æã«ã·ã¹ãã ã®ã»ãã¥ãªãã£ãå±éºã«ãããäºæããªãå¯ä½ç¨ãå¼ãèµ·ããå¯è½æ§ã®ããã³ã¼ããå«ã¾ãã¦ããå ´åãããã¾ãã
JSON-LDããã¥ã¡ã³ããå¦çããå ´åãé常ãé éã®ã³ã³ããã¹ãã¸ã®ãªã³ã¯ãèªåçã«è¾¿ãããããããã®çµæãããããã«å¯¾ãã¦ã¦ã¼ã¶ã¼ã®æç¤ºçãªãªã¯ã¨ã¹ãããªãã¦ããã¡ã¤ã«è»¢éãè¡ããã¾ããé éã®ã³ã³ããã¹ãã第ä¸è ãæä¾ãã¦ããå ´åããã©ã¤ãã·ã¼ã®æ¸å¿µã«ã¤ãªãããããªå©ç¨ãã¿ã¼ã³ãªã©ã®æ å ±ãåéã§ããå¯è½æ§ãããã¾ããJSON-LD 1.1å¦çã¢ã«ã´ãªãºã ã¨API仿§[JSON-LD11-API]ã§å®ç¾©ããã¦ããAPIãªã©ã®ç¹å®ã®å®è£ ã§ã¯ããã®åä½ãå¶å¾¡ããããã®ããç´°ããã¡ã«ããºã ãæä¾ãããã¨ãã§ãã¾ãã
HTTPãªã©ã®å®å ¨ã§ãªãæ¥ç¶ãä»ãã¦ã¦ã§ãããèªã¿è¾¼ã¾ããJSON-LDã³ã³ããã¹ãã¯ãæ»æè ã«ãã£ã¦å¤æ´ãããå±éºæ§ããããJSON-LDã®ã¢ã¯ãã£ãã»ã³ã³ããã¹ããã»ãã¥ãªãã£ãå±éºã«ããããããªãã®ã«å¤æ´ãããå¯è½æ§ãããã¾ããæ¥µãã¦éè¦ãªç®çã§é éã®ã³ã³ããã¹ãã«ä¾åãã¦ããã¢ããªã±ã¼ã·ã§ã³ã¯ãã·ã¹ãã ã«ããå©ç¨ã許å¯ããåã«ããã®é éã®ã³ã³ããã¹ããæ¤è¨¼ããã£ãã·ã¥ãããã¨ããå§ããã¾ãã
JSON-LDã§ã¯é·ãIRIãçãç¨èªã«ç½®ãæãããã¨ãã§ãããããJSON-LDããã¥ã¡ã³ããå¦çæã«å¤§å¹ ã«å±éãããææªã®å ´åãçµæã¨ãã¦ãã¼ã¿ãåä¿¡è ã®è³æºããã¹ã¦ä½¿ãåãå¯è½æ§ãããã¾ããã¢ããªã±ã¼ã·ã§ã³ã¯ãååãªç念ãæã£ã¦ãã¼ã¿ãæ±ãå¿ è¦ãããã¾ãã
JSON-LDã¯ä½¿ç¨ã§ããIRIã¹ãã¼ã ã«å¶éãè¨ãã¦ããããèªå½ã«å¯¾ãã¦ç¸å¯¾çãªIRIã¯IRI解決ã§ã¯ãªãæååé£çµãç¨ãããããéåç §ãããå ´åã«æªæãæã£ã¦å©ç¨ãããå¯è½æ§ã®ããIRIãæ§ç¯ãããã¨ãå¯è½ã§ãã
application/ld+jsonã§ç¨ãããããã©ã°ã¡ã³ãèå¥åã¯ãRDF 1.1æ¦å¿µããã³æ½è±¡æ§æ[RDF11-CONCEPTS]ã«å¾ã£ã¦ãRDFæ§æã¨åæ§ã«æ±ããã¾ãã
B. IDLç´¢å¼ãã®é ã¯éè¦ç¯çã§ãã
[Global=JsonLd, Exposed=C. æªè§£æ±ºã®èª²é¡JsonLd
] interfaceJsonLd
{}; [Exposed=JsonLd
] interfaceJsonLdProcessor
{constructor
(); static Promise<JsonLdRecord
>frame
(JsonLdInput
input,JsonLdInput
frame, optionalJsonLdOptions
options = {}); }; typedef record<USVString, any>JsonLdRecord
; typedef (JsonLdRecord
or sequence<JsonLdRecord
> or USVString or RemoteDocument)JsonLdInput
; dictionaryJsonLdFramingError
{JsonLdFramingErrorCode
code
; USVString?message
= null; }; enumJsonLdFramingErrorCode
{ "invalid frame
", "invalid @embed value
" }; dictionaryJsonLdOptions
{ (JsonLdEmbed
or boolean)embed
= "@once"; booleanexplicit
= false; booleanomitDefault
= false; booleanomitGraph
; booleanrequireAll
= false; booleanframeDefault
= false; booleanordered
= false; }; enumJsonLdEmbed
{ "@always
", "@once
", "@never
" };
ãã®é ã¯éè¦ç¯çã§ãã
ä¸è¨ã¯ãå ¬éæç¹ã§æªè§£æ±ºã®èª²é¡ã®ãªã¹ãã§ãã
ã¯ã©ã¹ãç¯å²ã¨ãããã¬ã¼ã åã許å¯
åããã¬ã¼ã ã»ããã¥ã¡ã³ãå ã«è¤æ°ã®ãã¬ã¼ã ?
D. 2012å¹´8æ30æ¥ã®1.0èæ¡ä»¥å¾ã®å¤æ´ãã®é ã¯éè¦ç¯çã§ãã
@embed
)ãæ§ã
ãªå¤ãåããã¨ãã§ããããã«ãªã£ããwildcard
ã¨match none
ãåã¨ããããã£ã¼å¤ã«ä½¿ç¨ã§ããããã«ãªã£ãã@value
ã@type
ã@language
ã®å¤ã¯ãwildcard
ã¨match none
ã使ç¨ã§ããç¹å®ã®æååã®éå(ä¾ãã°ãç¹å®ã®è¨èªã®éå)ãç¨ãã¦ãããããããã¨ãã§ããããã«ãªã£ãã@reverse
ããµãã¼ãããããã«ãªã£ãã@id
ã«1ã¤ä»¥ä¸ã®å¤ãç¨ãã¦ããã¬ã¼ã å
ã®ç¹å®ã®ãªãã¸ã§ã¯ãã«ãããã³ã°ãè¡ããããã«ãªã£ããjson-ld-1.0
ã§ãªããã°ããã®@id
ã«ã®ã¿ç¨ãããããã©ã³ã¯ã»ãã¼ãèå¥åãæã¤@id
ã¨ã³ããªã¼ã¯åé¤ãããããã«ãªã£ãã@link
ã¨ã¡ã¢ãªå
ã®ãªãã¸ã§ã¯ãã»ãªã³ã¯ã®ãµãã¼ããåé¤ãomitDefault
APIãªãã·ã§ã³ãç¾å¨ã®å¦çã¢ã¼ãã§å¶å¾¡ãããããã©ã«ãçç¥ãã©ã°ã追å ãfalse
ã®ordered
ãªãã·ã§ã³ãAPIã«è¿½å ãããã¯ããããã»ã¨ã³ããªã¼ã»ãã¼ã®å復ãå¶å¾¡ããããã«ã¢ã«ã´ãªãºã ã§ç¨ããã以åã¯ããã®ã¢ã«ã´ãªãºã ã«ã¯ããã®ãããªé åºã常ã«å¿
è¦ã ã£ããããã«ä¼´ãã試é¨çµæã®è©ä¾¡æ¹æ³ãæ´æ°ããã@reverse
ãç¨ããéããããã£ã¼ãã¾ãã¯@reverse
ã§å®ç¾©ãããç¨èªãå«ããã¨ãã§ããããã«ããããã¬ã¼ã ã®å¯¾è±¡ã¨ãªã£ã¦ãããã¼ããåç
§ãã¦ãããã¼ãã«ãéåç
§ã使ãããå¯è½æ§ãããããã®é ã¯éè¦ç¯çã§ãã
false
ã®ordered
ãªãã·ã§ã³ãAPIã«è¿½å ãããã¯ããããã»ã¨ã³ããªã¼ã»ãã¼ã®å復ãå¶å¾¡ããããã«ã¢ã«ã´ãªãºã ã§ç¨ããã以åã¯ããã®ã¢ã«ã´ãªãºã ã«ã¯ããã®ãããªé åºã常ã«å¿
è¦ã ã£ããããã«ä¼´ãã試é¨çµæã®è©ä¾¡æ¹æ³ãæ´æ°ãããapplication/ld-frame+json
ããapplication/ld+json
ã«å¤æ´ããprofile
ãã©ã¡ã¼ã¿ãå¿
é ã«ããã@id
ã@type
ãå«ããã¹ã¦ã®ããããã£ã¼ã®åå¨ãå¿
é ã¨ãªã£ãã@once
ãåªå
ãã¦ããªãã¸ã§ã¯ãçµã¿è¾¼ã¿ãã©ã°ã®@first
ã¨@last
ã®å¤ãåé¤ãjson-ld-1.0
ã«è¨å®ããã¦ããªãéããå¦çã¢ã¼ãã¯æé»çã«json-ld-1.1
ã«ãªã£ãã@type
ã¯ããã©ã«ãå¤ãæã¤ãã¨ãã§ããããããã¯ãã¬ã¼ã ã»ãããã³ã°ã®ç®çã«ã¯ç¨ããããªãããã®é ã¯éè¦ç¯çã§ãã
JsonLdProcessor
ã®å¦çã¹ãããã«ç§»åããã®é ã¯éè¦ç¯çã§ãã
[Exposed=(Window,Worker)]
ã[Exposed=JsonLd]
ã«å¤æ´ãããã¯ãã¬ãã¥ã¼ã®ææ¡ã«å¯¾å¦ããããã«ããã©ã¦ã¶ã¼ä»¥å¤ã§ç¨ããJsonLdProcessor
ã¤ã³ã¿ã¼ãã§ã¤ã¹ãå
¬éããããã«ã°ãã¼ãã«ã»ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¨ãã¦å®£è¨ãããããã®é ã¯éè¦ç¯çã§ãã
ç·¨éè ã¯ããã®ä»æ§ã®ä½æã¨ç·¨éã«å¤å¤§ãªè²¢ç®ããã¦ãã ãã£ãæ¬¡ã®æ¹ã ã«ç¹ã«æè¬ç³ãä¸ãã¾ãã
ããã«ãçºè¡¨æã®ã¯ã¼ãã³ã°ã°ã«ã¼ãã®ã¡ã³ãã¼ã¯æ¬¡ã®æ¹ã ã§ããã
ã¡ã¼ãªã³ã°ã»ãªã¹ãã鱿¬¡ã®ãã¬ãä¼è°ã«ããå¤ãã®æè¡çãªèª²é¡ã«å¯¾ããåãçµã¿ã«é¢ããJSON-LDã³ãã¥ããã£ã»ã°ã«ã¼ãã®åå è ã§ããChris WebberãDavid WoodãDrummond ReedãEleanor JoslinãFabien GandonãHerm FisherãJamie PittsãKim Hamilton DuffyãNiklas LindstromãPaolo CiccareseãPaul FrazzeãPaul WarrenãReto GmurãRob TrainerãTed Thibodeau Jr.ãVictor Charpenayã«åã御礼ç³ãä¸ãã¾ãã
I. åèæç® I.1 è¦ç¯çãªåèæç®RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3