JSON-LD多种类型



我目前正在做一些json-ld。我对此还很陌生(也有编码(。我正试图弄清楚如何在一个脚本中使用不同的类型,如下所示。我无法把握我做错了什么,我应该改变什么才能让它发挥作用?感谢

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Course",
"name": "MSc in IT- Web Communication Design",
"coursePrerequisites": "The following bachelor degree programmes from the University of Southern Denmark and from other universities provide access to the Master’s degree in Web Communication Design: A relevant professional bachelor's degree, e.g. web developer, software developer, business language and IT-based marketing communication, school teacher, nurse, educator, social worker.",
"occupationalCredentialAwarded": "As a student of the MSc in IT – Web Communication Design you will gain specialised skills in web-based communication and knowledge management. Your choice of elective courses, your projects, your thesis as well as your bachelor background qualify you to work with: Web development, digitalisation, web design, digital skills development, social media, etc.",
"description":"Master of Science in IT Web Communication Design. A multi-disciplinary graduate programme that combines IT, communication and organisation. We emphasise the interaction between humans and information technology and combine research-based knowledge with challenges from practice."
},
"provider": {
"@type": "Organization",
"name": "University of Southern Denmark",
"department": "Institute for Design and Communication",
"address": "Universitetsparken 1, 6000 Kolding, Denmark",
"telephone": "+45 65 50 10 00"

},
{
"@context": "http://schema.org",
"@type": "EducationalOccupationalCredential",
"programPrerequisites": "You are expected to have basic knowledge of HTML and CSS before you commence the programme. This may be from courses in your Bachelor's, but it is also possible to obtain this knowledge through online tutorials, e.g. w3schools.com."

}
</script>

这里有一个验证版本:

<script type="application/ld+json">{
"@context": "https://schema.org",
"@type": "Course",
"name": "MSc in IT- Web Communication Design",
"coursePrerequisites": "You are expected to have basic knowledge of HTML and CSS before you commence the programme. This may be from courses in your Bachelor's, but it is also possible to obtain this knowledge through online tutorials, e.g. w3schools.com.",
"occupationalCredentialAwarded": "As a student of the MSc in IT – Web Communication Design you will gain specialised skills in web-based communication and knowledge management. Your choice of elective courses, your projects, your thesis as well as your bachelor background qualify you to work with: Web development, digitalisation, web design, digital skills development, social media, etc.",
"description": "Master of Science in IT Web Communication Design. A multi-disciplinary graduate programme that combines IT, communication and organisation. We emphasise the interaction between humans and information technology and combine research-based knowledge with challenges from practice.",
"provider": {
"@type": "Organization",
"name": "University of Southern Denmark",
"department": "Institute for Design and Communication",
"address": "Universitetsparken 1, 6000 Kolding, Denmark",
"telephone": "+45 65 50 10 00"
}
}</script>

脚本需要一个顶级对象,而不是一个对象列表。要绕过它,你可以使用@graph。我的更改意味着无论如何只有一个顶部对象。

这是因为你想连接你的信息。组织是课程的提供者,因此信息应该在课程对象中。

我不确定你的学历证书。我猜一门课程先决条件更接近你想要的。

最新更新