1

Is this good way to code JSON-LD for Schema.org’s JobPosting?

I place a number of JobPosting items in the same file. Is this working properly? Is this correct way?

<script type="application/ld+json"> {
            "@context" : "http://schema.org/",
            "@type" : "JobPosting",
            "title" : "Job1",
            "description" : "",
            "datePosted" : "2018-10-26",
            "validThrough" : "2018-11-02",
            "hiringOrganization": {
                 ...
            },
        "jobLocation": {
        "@type": "Place",
        "address": {
                    ...
          }
        },                    
    }
</script>


<script type="application/ld+json"> {
                        "@context" : "http://schema.org/",
                        "@type" : "JobPosting",
                        "title" : "Job2",
                        "description" : "",
                        "datePosted" : "2018-10-26",
                        "validThrough" : "2018-11-02",
                        "hiringOrganization": {
                             ...
                        },
                    "jobLocation": {
                    "@type": "Place",
                    "address": {
                                ...
                      }
                    },                    
                }
</script>
<script type="application/ld+json"> {
                    "@context" : "http://schema.org/",
                    "@type" : "JobPosting",
                    "title" : "Job3",
                    "description" : "",
                    "datePosted" : "2018-10-26",
                    "validThrough" : "2018-11-02",
                    "hiringOrganization": {
                         ...
                    },
                "jobLocation": {
                "@type": "Place",
                "address": {
                            ...
                  }
                },                    
            }
</script>
    .
    .
    .
    .
    .
<script type="application/ld+json"> {
                    "@context" : "http://schema.org/",
                    "@type" : "JobPosting",
                    "title" : "job - n",
                    "description" : "",
                    "datePosted" : "2018-10-26",
                    "validThrough" : "2018-11-02",
                    "hiringOrganization": {
                         ...
                    },
                "jobLocation": {
                "@type": "Place",
                "address": {
                            ...
                  }
                },                    
            }
</script>
  • Do you want to get a specific rich result, or do you ask generally? – unor Nov 15 '18 at 13:43
  • @unor I want to get all job posting . I write all script in same page .so I ask. Is this a correct way . Whether it generate all job posting or generate a first one ? – Sammu Sundar Nov 15 '18 at 16:23
  • I was asking about rich results (as you added the SEO tag, and rich results are typically the only SEO aspect of structured data): Do you want to get a rich result for the page where you have these multiple JobPosting items? If yes, which rich result / which search engine? The one from Google? – unor Nov 17 '18 at 1:50
1

It's correct to do that, but you can also just use an array:

<script type="application/ld+json">
[{
    "@context": "http://schema.org/",
    "@type": "JobPosting",
    "title": "Job1",
    "description": "",
    "datePosted": "2018-10-26",
    "validThrough": "2018-11-02",
    "hiringOrganization": {
        ...
    }
    ,
    "jobLocation": {
        "@type": "Place",
        "address": {
            ...
        }
    }
},
{
    "@context": "http://schema.org/",
    "@type": "JobPosting",
    "title": "Job2",
    "description": "",
    "datePosted": "2018-10-26",
    "validThrough": "2018-11-02",
    "hiringOrganization": {
        ...
    }
    ,
    "jobLocation": {
        "@type": "Place",
        "address": {
            ...
        }
    }
}]
</script>

More info: https://stackoverflow.com/questions/30723531/best-json-ld-practices-using-multiple-script-elements

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.