包括“午睡"在 JSON-LD 中的 Schema.org OpeningHoursSpecification [英] Including "siesta" in Schema.org OpeningHoursSpecification in JSON-LD
本文介绍了包括“午睡"在 JSON-LD 中的 Schema.org OpeningHoursSpecification的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 JSON-LD 中以这种方式使用 Schema.org OpeningHoursSpecification
:
I'm using Schema.org OpeningHoursSpecification
in JSON-LD in such a way:
[{"@type":"OpeningHoursSpecification","dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"],"open":"08:00","closes":"20:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":["Saturday"],"open":"08:00","closes":"14:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":["Sunday"],"open":"00:00","closes":"00:00"}]
我找不到任何示例来调整此规范以包含午睡" - 一个地方运营的情况,例如从早上 8 点到下午 1 点,从下午 3 点到晚上 8 点.
I couldn't find any example for adapting this specification to include "siesta" - a situation when a place operates e.g. from 8AM to 1PM and from 3PM to 8PM.
推荐答案
EDITED PER @UNOR
这可能会让您开始:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Service",
"url": "http://www.example.com/",
"hoursAvailable": [{
"@type": "OpeningHoursSpecification",
"opens": "08:00",
"closes": "13:00",
"dayOfWeek": [{
"@type": "DayOfWeek",
"@id": "http://schema.org/Monday",
"name": "Monday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Tuesday",
"name": "Tuesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Wednesday",
"name": "Wednesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Thursday",
"name": "Thursday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Friday",
"name": "Friday"
}]
},
{
"@type": "OpeningHoursSpecification",
"opens": "15:00",
"closes": "20:00",
"dayOfWeek": [{
"@type": "DayOfWeek",
"@id": "http://schema.org/Monday",
"name": "Monday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Tuesday",
"name": "Tuesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Wednesday",
"name": "Wednesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Thursday",
"name": "Thursday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Friday",
"name": "Friday"
}]
}]
}
</script>
您可以使用更精确的 @Service
类型进行修饰并添加时区信息.
You can embellish with a more precise type of @Service
and add time zone information.
这篇关于包括“午睡"在 JSON-LD 中的 Schema.org OpeningHoursSpecification的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文