以JSON-LD形式请求schema.org词汇表时(可以通过以下请求标题完成):
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中所示的任何类型。即使查看单个类型http://schema.org/CreativeWork,也有许多属性未出现在文档中(例如:keywords)。即使属性name,它应该是每个Thing的一部分,也不会出现在结果中。
为什么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" }
}
}
答案 0 :(得分:2)
因为这不是词汇表的定义,而只是Schema.org的JSON-LD上下文,即从好的,简短的JSON术语到完整的URL的映射。有关详细信息,请参阅http://www.w3.org/TR/json-ld/#the-context。
它没有逐个映射每个属性和类的原因是它使用@vocab
快捷方式,该快捷方式也在规范中描述:http://www.w3.org/TR/json-ld/#default-vocabulary