JSON-LD 1.0

JSON-LD

[21] JSON-LD は、 W3C が提唱する Linked DataJSON によって記述するデータ形式です。

仕様書

言語

[73] 一般的な JSONオブジェクトなどの構造のうち、 @context など @ から始まる名前が JSON-LD 固有の意味を持つものとなっています。

[82] JSON-LD のデータモデルは RDFデータモデルをベースにしています。

[83] JSON-LDRDFデータモデルが使っている IRI という古い時代の概念を未だに使い続けています。 現在の URL に当たりますが、その意味と構文に微妙な違いがいろいろあります。 普通の人には理解困難でしょう。

文脈

[71] 単独のファイルとして用いられる他、 スクリプトデータブロック (>>27) としても用いられます。

[72] JSON-LDJSON応用ですから、 MIME型などの外部的な手段を用いない限り、 ただの JSON と完全に区別することはできません。 (オブジェクト内の名前などから JSON-LD っぽいかどうかは判断できます。)

MIME 型

[32] MIME型 application/ld+json が用いられています。

[76] */*+ld+json が使われることがあります。 e.g. application/did+ld+json

[65] JSON-LD 1.0 ( 版) https://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld/index.html#application-ld-json

application/ld+json

[67] Social Web Protocols ( ()) https://www.w3.org/TR/2016/WD-social-web-protocols-20160603/

[ActivityStreams2] content must be served with the Content-Type application/activity+json or, if necessary for JSON-LD extended implementations, application/ld+json; profile="http://www.w3.org/ns/activitystreams".

[68] Web Annotation Data Model () https://w3c.github.io/web-annotation/model/wd2/#h-serialization-of-the-model

The media type of this format is defined in Section 3 of the Annotation Protocol [annotation-protocol] as application/ld+json;profile="http://www.w3.org/ns/anno.jsonld".

[69] Web Annotation Protocol () https://w3c.github.io/web-annotation/protocol/wd/#h-annotation-retrieval

Servers must support the JSON-LD representation using the Web Annotation profile. These responses must have a Content-Type header with the application/ld+json media type, and it should have the Web Annotation profile IRI of http://www.w3.org/ns/anno.jsonld in the profile parameter.

[70] Embedding Web Annotations in HTML () https://w3c.github.io/web-annotation/serialization-html-note/#embed-json-ld

JSON-LD [json-ld] is the serialization format used in the Web Annotation Data Model [annotation-model]. HTML can accommodate this serialization format directly via the use of the HTML <script> element with its type attribute assigned the media type for a Web Annotation: application/ld+json;profile="http://www.w3.org/ns/anno.jsonld".

応用

[55] JSON-LD応用

[47] Activity Streams 2.0JSON-LD を使っていますが、 JSON-LD を使わなくても良いとしています。また、 JSON-LD と矛盾する拡張がなされる可能性も指摘するなど、 奇怪な使い方をしています。 Activity Streams 2.0

スクリプトデータブロック

[27] schema.orgJSON-LD により記述して HTMLスクリプトデータブロックとして埋め込む方法を定義しており、 Google などが実装しているようです。

[66] ( 版) http://limia.jp/idea/20387/

<body>

<script type="application/ld+json">

{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/","name":"LIMIAトップ"}},{"@type":"ListItem","position":2,"item":{"@id":"/idea/","name":"アイデア"}},{"@type":"ListItem","position":3,"item":{"@id":"/ideas/house/","name":"家づくり"}},{"@type":"ListItem","position":4,"item":{"@id":"/idea/20387/","name":"【施工事例】高気密断熱デザイン住宅 r+house 豊中市小曽根 I 様邸"}}]}

</script>

[77] ほとんどの場合はマイクロデータでも記述できます。 マイクロデータHTML の本文と一緒に書くのに対して、 JSON-LD は別に script 要素を用意して書かなければならないので、 メンテナンスコストの増大につながるのが欠点です。

批判

[50] JSONRDF 式の名前空間機構を持ち込んだ JSON-LD は、 XML に複雑な XML名前空間を持ち込ませた RDF/XML の轍を踏むものだと非難されています。

[51] JSON-LDLinked DataSemantic Web コミュニティー内部で用いられている限りは大した影響はありませんが、 それ以外の一般的な Web の情報交換に JSON-LD を組み込もうとする勢力があり、 懐疑的な筋から警戒されているようです。

[56] JSON-LD は複雑で取扱いが難しいため、 Linked Data 以外の場面では使うべきではありません。

Semantic Web との関係

[26] 一昔前なら RDF/JSON とでも呼ばれていたのでしょうが、 Semantic Web が不発に終わり Linked Data が新たなキーワードとなり、 RDF との関係を表に出さない形とされたようです (>>22 参照)。

関連

[31] LDJSON とは無関係です。

歴史

[1] JSON-LD - Linked Data Expression in JSON ( 版) http://rdfa.digitalbazaar.com/specs/source/json-ld/

[2] JSON-LD Syntax 1.0 ( ( 版)) http://json-ld.org/spec/FCGS/json-ld-syntax/20120626/

[3] JSON-LD API 1.0 ( ( 版)) http://json-ld.org/spec/FCGS/json-ld-api/20120626/

[4] JSON-LD API 1.0 ( ( 版)) http://www.w3.org/TR/2012/WD-json-ld-api-20120712/

[5] JSON-LD Syntax 1.0 ( ( 版)) http://www.w3.org/TR/2012/WD-json-ld-syntax-20120712/

[6] [whatwg] Was is considered to use JSON-LD instead of creating application/microdata+json? ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-August/036871.html

[7] JSON-LD 1.0 ( ( 版)) http://www.w3.org/TR/2013/WD-json-ld-20130411/

[8] JSON-LD 1.0 Processing Algorithms and API ( ( 版)) http://www.w3.org/TR/2013/WD-json-ld-api-20130411/

[9] JSON-LD 1.0 ( ( 版)) http://www.w3.org/TR/2013/CR-json-ld-20130910/

[10] JSON-LD 1.0 Processing Algorithms and API ( ( 版)) http://www.w3.org/TR/2013/CR-json-ld-api-20130910/

[11] JSON-LD 1.0 ( ( 版)) http://www.w3.org/TR/2013/PR-json-ld-20131105/

[12] JSON-LD 1.0 Processing Algorithms and API ( ( 版)) http://www.w3.org/TR/2013/PR-json-ld-api-20131105/

[13] Go-To Actions - Actions in the Inbox — Google Developers ( ( 版)) https://developers.google.com/gmail/actions/reference/go-to-action?hl=ja

[14] JSON-LD in examples invalid due to comments ( (Markus Lanthaler 著, 版)) http://lists.w3.org/Archives/Public/public-vocabs/2013Nov/0215.html

[15] JSON-LD 1.0 ( ( 版)) http://www.w3.org/TR/2014/REC-json-ld-20140116/

[16] JSON-LD 1.0 ( ( 版)) http://www.w3.org/TR/json-ld/

[17] JSON-LD 1.0 Implementation Report ( ( 版)) https://dvcs.w3.org/hg/json-ld/raw-file/default/test-suite/reports/cr-20131022.html

[18] JSON LD Errata - Semantic Web Standards ( ( 版)) http://www.w3.org/2001/sw/wiki/JSON_LD_Errata

[19] JSON-LD 1.0 Processing Algorithms and API ( ( 版)) http://www.w3.org/TR/2014/REC-json-ld-api-20140116/

[20] JSON-LD 1.0 Processing Algorithms and API ( ( 版)) http://www.w3.org/TR/json-ld-api/

[22] JSON-LD - JSON for Linking Data ( 版) http://json-ld.org/

[23] JSON-LD and Why I Hate the Semantic Web | The Beautiful, Tormented Machine ( 版) http://manu.sporny.org/2014/json-ld-origins-2/

Many W3C specifications are so cryptic that they require the sacrifice of your sanity and a secret W3C decoder ring to read. I never understood why these documents were so difficult to read, and after years of study on the matter, I think I found the answer. It turns out that most specification editors are just crap at writing.

[25] Official Google Webmaster Central Blog: Easier website development with Web Components and JSON-LD ( 版) http://googlewebmastercentral.blogspot.jp/2015/03/easier-website-development-with-web.html

[33] The Web Browser API Incubation Anti-Pattern | The Beautiful, Tormented Machine ( 版) http://manu.sporny.org/2016/browser-api-incubation-antipattern/

the editors of the Web Payments Community Group specifications discovered (through a backchannel discussion) that “the browser vendors are never going to adopt JSON-LD and the Web Payments Community Group specification will never gain traction as a result”. The Web Payments Community Group specifications used JSON-LD to meet the extensibility needs of Web Payments. This desire to not use JSON-LD by the browser vendors was never communicated through any public channel nor was it directly communicated by the browser vendors privately.

[34] JSON-LD API Best Practices note ( (Gregg Kellogg著, )) https://lists.w3.org/Archives/Public/public-linked-json/2016Jun/0002.html

[35] Building JSON-LD APIs: Best Practices ( ()) http://json-ld.org/spec/latest/json-ld-api-best-practices/

[36] [Fwd: [wbs] response to 'Call for Review: Web of Things Working Group Charter'] (L. David Baron著, ) https://lists.w3.org/Archives/Public/www-archive/2016Oct/0004.html

We are also concerned about the clauses in the charter tying the group

to RDF, JSON-LD, and other technologies that have not been widely

accepted by Web developers, and which could burden the group with

considerable unneeded complexity.

[37] Raptor RDF Syntax Library () http://librdf.org/raptor/

JSON-LD is not supported - too complex to implement.

[38] PubChemRDF Release Notes () https://pubchem.ncbi.nlm.nih.gov/rdf/#_Toc421254649

JSON-LDc

application/x-json+ld

application/x-json+rdf

application/json+ld

application/json+rdf

application/ld+json

application/rdf+json

Jsonld

Json-ld

ldjson

ld-json

[39] Project Open Data Metadata Schema v1.1 - Project Open Data () https://project-open-data.cio.gov/v1.1/schema/

[40] remoteStorage ‒ An open protocol for per-user storage on the Web () https://remotestorage.io/

In addition to that – and the only special feature aside from plain HTTP – there are directory listings, formatted as JSON-LD. They contain both the content type and size, as well as ETags, which can be used to implement sync mechanisms. The files and listings themselves also carry ETag headers for sync/caching and conditional requests.

[41] remoteStorage ‒ An open protocol for per-user storage on the Web () https://remotestorage.io/

In addition to that – and the only special feature aside from plain HTTP – there are directory listings, formatted as JSON-LD. They contain both the content type and size, as well as ETags, which can be used to implement sync mechanisms. The files and listings themselves also carry ETag headers for sync/caching and conditional requests.

[42] Scoped Contexts (Gregg Kellogg著, ) https://lists.w3.org/Archives/Public/public-linked-json/2017Jan/0000.html

[43] Web Annotation Vocabulary () https://w3c.github.io/web-annotation/vocab/wd/#h-extensions

[44] Web Annotation Vocabulary () https://w3c.github.io/web-annotation/vocab/wd/#h-extensions

Note that the current JSON-LD [JSON-LD] specification does not allow arrays to contain other arrays directly. As JSON-LD is the recommended serialization format, extensions should avoid the use of this pattern.

[46] Activity Streams 2.0 () https://w3c.github.io/activitystreams/core/#h-media-type

Because Activity Streams 2.0 can be considered a restricted profile of JSON-LD, Implementations should consider the `application/ld+json; profile="https://www.w3.org/ns/activitystreams"` media type as being equivalent to `application/activity+json`.

[52] Application data schemas & how to manage decentralized development · Issue #820 · beakerbrowser/beaker () https://github.com/beakerbrowser/beaker/issues/820

[53] JSON-LD 1.1 Working Group vote (Robert Sanderson著, ) https://lists.w3.org/Archives/Public/public-linked-json/2018Mar/0009.html

[54] json-ld/json-ld.org: JSON for Linked Data () https://github.com/json-ld/json-ld.org

[57] Google's response to 'Call for Review: JSON-LD Working Group Charter' (fwd) (Coralie Mercier著, ) https://lists.w3.org/Archives/Public/public-new-work/2018May/0000.html

[58] [wbs] response to 'Call for Review: JSON-LD Working Group Charter' (David Baron via WBS Mailer著, ) https://lists.w3.org/Archives/Public/public-new-work/2018Apr/0012.html

[59] W3C JSON-LD Working Group () https://www.w3.org/2018/json-ld-wg/

[60] Request for Position: Web Thing API · Issue #44 · mozilla/standards-positions () https://github.com/mozilla/standards-positions/issues/44

[61] W3C JSON-LD Working Group () https://www.w3.org/2018/json-ld-wg/WorkMode/guiding_principles

[74] JSON-LD Collaborative Work and Feature Timeline | W3C Blog () https://www.w3.org/blog/2019/03/json-ld-collaborative-work-and-feature-timeline/

[75] JSON-LD Working Group Charter () https://www.w3.org/2018/03/jsonld-wg-charter.html

[81] 簡単だみたいに謳ってるけどすごい巨大で複雑な仕様だなあ。。。