![](/img/trans.png)
[英]How to setup “application/ld+json” schema.org meta data in rails 4 app
[英]Schema.org fails to deliver application/ld+json
在我的 java 應用程序中,我收到以下錯誤
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
com.github.jsonldjava.core.JsonLdError: loading remote context failed: http://schema.org/
使用 curl 我目前得到類似
curl -i -L -k --compressed -H "Accept: application/ld+json" https://schema.org/
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-headers: Accept
access-control-allow-methods: GET
access-control-allow-origin: *
access-control-expose-headers: Link
link: </docs/jsonldcontext.jsonld>; rel="alternate"; type="application/ld+json"
....
/** Body contains HTML payload **/
主頁不再支持內容協商。 相反,您必須按照以下說明進行操作
https://schema.org/docs/developers.html
並使用其中一個鏈接版本:
例如
https://schema.org/version/latest/schemaorg-current-http.jsonld
{
"@context" : "https://schema.org/version/latest/schemaorg-current-http.jsonld"
}
或與 curl
curl -i -L https://schema.org/version/latest/schemaorg-current-http.jsonld
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.