Microdataの場合、idとitemrefによって重複した情報を使いまわす仕組みがある。
<div id="meta-author" itemtype="http://schema.org/Person" itemprop="author" itemscope>
<h2 itemprop="name">Life is good</h2>
</div>
<!-- 省略 -->
<article itemtype="http://schema.org/Article" itemscope itemref="meta-author">
<h2 itemprop="headline">Hoge hoge</h2>
</article>
<article itemtype="http://schema.org/Article" itemscope itemref="meta-author">
<h2 itemprop="headline">Fuga fuga</h2>
</article>
同じようなことをJSON-LDで実現するには、@id
を使う。
<!-- Person -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Person",
"@id": "http://liginc.co.jp/#author",
"name": "Life is good",
//省略
}
</script>
<!-- Artice -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "Hoge hoge",
"author": {"@id": "http://liginc.co.jp/#author"},
// 省略
}
</script>
<!-- Artice -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "Fuga fuga",
"author": {"@id": "http://liginc.co.jp/#author"},
//省略
}
</script>
参考
構造化データにおいて、値の流用(引用?継承?冗長性の抑制?変数化?エイリアス化?)を行いたい - Google プロダクト フォーラム