为什么 schema.org JSON-LD 表示这么小?
Why is the schema.org JSON-LD representation so small?
请求 JSON-LD 形式的 schema.org 词汇时(可以通过以下请求 headers 完成):
Accept: application/ld+json, application/json;q=0.9, application/javascript;q=0.5, text/javascript;q=0.5, text/plain;q=0.2, */*;q=0.1
回复文件(截断在底部)乍一看似乎非常小且不完整。它只列出了一些属性,并且似乎没有像 full hierarchy. Even looking at a single type, http://schema.org/CreativeWork, there are many attributes that don't appear in the document (ex: keywords). Even the attribute name 中显示的任何类型,这应该是每个事物的一部分,但没有出现在结果中。
为什么 schema.org 中提到的所有属性都没有包含在本文档中?
{
"@context": {
"@vocab": "http://schema.org/",
"acceptsReservations": { "@type": "@id" },
"additionalType": { "@type": "@id" },
"applicationCategory": { "@type": "@id" },
"applicationSubCategory": { "@type": "@id" },
"arrivalTime": { "@type": "DateTime" },
"artform": { "@type": "@id" },
"availabilityEnds": { "@type": "DateTime" },
"availabilityStarts": { "@type": "DateTime" },
"availableFrom": { "@type": "DateTime" },
"availableThrough": { "@type": "DateTime" },
"birthDate": { "@type": "Date" },
"bookingTime": { "@type": "DateTime" },
"checkinTime": { "@type": "DateTime" },
"checkoutTime": { "@type": "DateTime" },
"codeRepository": { "@type": "@id" },
"commentTime": { "@type": "Date" },
"contentUrl": { "@type": "@id" },
"dateCreated": { "@type": "Date" },
"dateIssued": { "@type": "DateTime" },
"dateModified": { "@type": "Date" },
"datePosted": { "@type": "Date" },
"datePublished": { "@type": "Date" },
"deathDate": { "@type": "Date" },
"departureTime": { "@type": "DateTime" },
"discussionUrl": { "@type": "@id" },
"dissolutionDate": { "@type": "Date" },
"doorTime": { "@type": "DateTime" },
"downloadUrl": { "@type": "@id" },
"dropoffTime": { "@type": "DateTime" },
"embedUrl": { "@type": "@id" },
"endDate": { "@type": "Date" },
"endTime": { "@type": "DateTime" },
"expectedArrivalFrom": { "@type": "DateTime" },
"expectedArrivalUntil": { "@type": "DateTime" },
"expires": { "@type": "Date" },
"featureList": { "@type": "@id" },
"foundingDate": { "@type": "Date" },
"gameLocation": { "@type": "@id" },
"gamePlatform": { "@type": "@id" },
"guidelineDate": { "@type": "Date" },
"hasMap": { "@type": "@id" },
"image": { "@type": "@id" },
"installUrl": { "@type": "@id" },
"isBasedOnUrl": { "@type": "@id" },
"labelDetails": { "@type": "@id" },
"lastReviewed": { "@type": "Date" },
"license": { "@type": "@id" },
"logo": { "@type": "@id" },
"map": { "@type": "@id" },
"maps": { "@type": "@id" },
"material": { "@type": "@id" },
"memoryRequirements": { "@type": "@id" },
"menu": { "@type": "@id" },
"modifiedTime": { "@type": "DateTime" },
"namedPosition": { "@type": "@id" },
"orderDate": { "@type": "DateTime" },
"ownedFrom": { "@type": "DateTime" },
"ownedThrough": { "@type": "DateTime" },
"paymentDue": { "@type": "DateTime" },
"paymentUrl": { "@type": "@id" },
"pickupTime": { "@type": "DateTime" },
"prescribingInfo": { "@type": "@id" },
"previousStartDate": { "@type": "Date" },
"priceValidUntil": { "@type": "Date" },
"publishingPrinciples": { "@type": "@id" },
"relatedLink": { "@type": "@id" },
"releaseDate": { "@type": "Date" },
"releaseNotes": { "@type": "@id" },
"replyToUrl": { "@type": "@id" },
"requirements": { "@type": "@id" },
"roleName": { "@type": "@id" },
"sameAs": { "@type": "@id" },
"scheduledPaymentDate": { "@type": "Date" },
"scheduledTime": { "@type": "DateTime" },
"screenshot": { "@type": "@id" },
"serviceUrl": { "@type": "@id" },
"significantLink": { "@type": "@id" },
"significantLinks": { "@type": "@id" },
"sport": { "@type": "@id" },
"startDate": { "@type": "Date" },
"startTime": { "@type": "DateTime" },
"storageRequirements": { "@type": "@id" },
"surface": { "@type": "@id" },
"targetUrl": { "@type": "@id" },
"temporal": { "@type": "DateTime" },
"thumbnailUrl": { "@type": "@id" },
"ticketToken": { "@type": "@id" },
"trackingUrl": { "@type": "@id" },
"uploadDate": { "@type": "Date" },
"url": { "@type": "@id" },
"validFrom": { "@type": "DateTime" },
"validThrough": { "@type": "DateTime" },
"validUntil": { "@type": "Date" },
"warning": { "@type": "@id" },
"webCheckinTime": { "@type": "DateTime" }
}
}
因为这不是词汇表的定义,而只是 Schema.org 的 JSON-LD 上下文,即从漂亮、简短的 JSON 术语到完整 URL 的映射。有关详细信息,请参阅 http://www.w3.org/TR/json-ld/#the-context。
它没有将每个 属性 和 class 一个一个映射的原因是它使用了 @vocab
快捷方式,这也在规范中进行了描述:http://www.w3.org/TR/json-ld/#default-vocabulary
请求 JSON-LD 形式的 schema.org 词汇时(可以通过以下请求 headers 完成):
Accept: application/ld+json, application/json;q=0.9, application/javascript;q=0.5, text/javascript;q=0.5, text/plain;q=0.2, */*;q=0.1
回复文件(截断在底部)乍一看似乎非常小且不完整。它只列出了一些属性,并且似乎没有像 full hierarchy. Even looking at a single type, http://schema.org/CreativeWork, there are many attributes that don't appear in the document (ex: keywords). Even the attribute name 中显示的任何类型,这应该是每个事物的一部分,但没有出现在结果中。
为什么 schema.org 中提到的所有属性都没有包含在本文档中?
{
"@context": {
"@vocab": "http://schema.org/",
"acceptsReservations": { "@type": "@id" },
"additionalType": { "@type": "@id" },
"applicationCategory": { "@type": "@id" },
"applicationSubCategory": { "@type": "@id" },
"arrivalTime": { "@type": "DateTime" },
"artform": { "@type": "@id" },
"availabilityEnds": { "@type": "DateTime" },
"availabilityStarts": { "@type": "DateTime" },
"availableFrom": { "@type": "DateTime" },
"availableThrough": { "@type": "DateTime" },
"birthDate": { "@type": "Date" },
"bookingTime": { "@type": "DateTime" },
"checkinTime": { "@type": "DateTime" },
"checkoutTime": { "@type": "DateTime" },
"codeRepository": { "@type": "@id" },
"commentTime": { "@type": "Date" },
"contentUrl": { "@type": "@id" },
"dateCreated": { "@type": "Date" },
"dateIssued": { "@type": "DateTime" },
"dateModified": { "@type": "Date" },
"datePosted": { "@type": "Date" },
"datePublished": { "@type": "Date" },
"deathDate": { "@type": "Date" },
"departureTime": { "@type": "DateTime" },
"discussionUrl": { "@type": "@id" },
"dissolutionDate": { "@type": "Date" },
"doorTime": { "@type": "DateTime" },
"downloadUrl": { "@type": "@id" },
"dropoffTime": { "@type": "DateTime" },
"embedUrl": { "@type": "@id" },
"endDate": { "@type": "Date" },
"endTime": { "@type": "DateTime" },
"expectedArrivalFrom": { "@type": "DateTime" },
"expectedArrivalUntil": { "@type": "DateTime" },
"expires": { "@type": "Date" },
"featureList": { "@type": "@id" },
"foundingDate": { "@type": "Date" },
"gameLocation": { "@type": "@id" },
"gamePlatform": { "@type": "@id" },
"guidelineDate": { "@type": "Date" },
"hasMap": { "@type": "@id" },
"image": { "@type": "@id" },
"installUrl": { "@type": "@id" },
"isBasedOnUrl": { "@type": "@id" },
"labelDetails": { "@type": "@id" },
"lastReviewed": { "@type": "Date" },
"license": { "@type": "@id" },
"logo": { "@type": "@id" },
"map": { "@type": "@id" },
"maps": { "@type": "@id" },
"material": { "@type": "@id" },
"memoryRequirements": { "@type": "@id" },
"menu": { "@type": "@id" },
"modifiedTime": { "@type": "DateTime" },
"namedPosition": { "@type": "@id" },
"orderDate": { "@type": "DateTime" },
"ownedFrom": { "@type": "DateTime" },
"ownedThrough": { "@type": "DateTime" },
"paymentDue": { "@type": "DateTime" },
"paymentUrl": { "@type": "@id" },
"pickupTime": { "@type": "DateTime" },
"prescribingInfo": { "@type": "@id" },
"previousStartDate": { "@type": "Date" },
"priceValidUntil": { "@type": "Date" },
"publishingPrinciples": { "@type": "@id" },
"relatedLink": { "@type": "@id" },
"releaseDate": { "@type": "Date" },
"releaseNotes": { "@type": "@id" },
"replyToUrl": { "@type": "@id" },
"requirements": { "@type": "@id" },
"roleName": { "@type": "@id" },
"sameAs": { "@type": "@id" },
"scheduledPaymentDate": { "@type": "Date" },
"scheduledTime": { "@type": "DateTime" },
"screenshot": { "@type": "@id" },
"serviceUrl": { "@type": "@id" },
"significantLink": { "@type": "@id" },
"significantLinks": { "@type": "@id" },
"sport": { "@type": "@id" },
"startDate": { "@type": "Date" },
"startTime": { "@type": "DateTime" },
"storageRequirements": { "@type": "@id" },
"surface": { "@type": "@id" },
"targetUrl": { "@type": "@id" },
"temporal": { "@type": "DateTime" },
"thumbnailUrl": { "@type": "@id" },
"ticketToken": { "@type": "@id" },
"trackingUrl": { "@type": "@id" },
"uploadDate": { "@type": "Date" },
"url": { "@type": "@id" },
"validFrom": { "@type": "DateTime" },
"validThrough": { "@type": "DateTime" },
"validUntil": { "@type": "Date" },
"warning": { "@type": "@id" },
"webCheckinTime": { "@type": "DateTime" }
}
}
因为这不是词汇表的定义,而只是 Schema.org 的 JSON-LD 上下文,即从漂亮、简短的 JSON 术语到完整 URL 的映射。有关详细信息,请参阅 http://www.w3.org/TR/json-ld/#the-context。
它没有将每个 属性 和 class 一个一个映射的原因是它使用了 @vocab
快捷方式,这也在规范中进行了描述:http://www.w3.org/TR/json-ld/#default-vocabulary