A php class to generate a Jobposting Schema with a flexible dot notation. This schema is to describes a job opening in a certain organization.


The source code can be found on GitHub at


Test your result with Google Testing-Tool.


First include the jobposting php class.

<?php include_once 'path/to/schema-jobposting.class.php'; ?>

Then use the class on your site to generate JSON-format or a script.

$sjp = new SchemaJobposting();
$sjp->set('datePosted', '');
$sjp->set('validThrough', date('Y-m-d', strtotime('+1 year')));
$sjp->set('title', '');
$sjp->set('description', '');
$sjp->set('employmentType', []); // FULL_TIME, PART_TIME, contract, temporary, seasonal, internship
$sjp->set('', '');
$sjp->set('hiringOrganization.sameAs', '');
$sjp->set('hiringOrganization.logo', '');
$sjp->set('jobLocation.address.streetAddress', '');
$sjp->set('jobLocation.address.addressLocality', '');
$sjp->set('jobLocation.address.postalCode', '');
$sjp->set('jobLocation.address.addressRegion', ''); // adressRegion (Land-Bundesland als ISO 3166-2 Code)
$sjp->set('jobLocation.address.addressCountry', '');
$sjp->set('baseSalary.currency', 'EUR');
$sjp->set('baseSalary.value', 'nach Vereinbarung / Qualifikation');
//echo '<pre><mark>|'.$sjp->toJson();echo '|</mark></pre>';
echo $sjp->toScript();

You can add even more with this dot notation.