2

以 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

乍一看,响应文件(在底部被剪断)似乎非常小且不完整。它只列出了一些属性,并且似乎没有像完整层次结构中显示的任何类型。即使查看单一类型http://schema.org/CreativeWork,也有许多属性没有出现在文档中(例如:keywords)。甚至应该是每个事物的一部分的属性名称也不会出现在结果中。

为什么 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" }
    }
}

4

1 回答 1

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

于 2015-03-12T08:06:07.550 回答