How can I include Google Structured Data via a module? Looking through Google's suggestions of search optimisation for a site that I control, I would like to add their "Structured Data" JSON to various pages on the site. Their suggestion is to include the data in custom script tags:

&lt;script type="application/ld+json"&gt;
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "url": "http://website.com",
  "logo": "http://website.com/logo.png",
  "contactPoint": [{
    "@type": "ContactPoint",
    "telephone": "+44 1234 567890",
    "contactType": "customer service"
  }]
}
&lt;/script&gt;


What I can't work out is how to include this data "the Drupal way". I tried adding it as a library (thinking I'd later use DrupalSettings to customise the contents) but that includes it as a standard "type=javascript". How do I add it to the page header with the correct script type?

Google ref: https://developers.google.com/search/docs/data-types/corporate-contact

(answers giving a module that does this already are also welcome!)
There is a Drupal 8 module works tandem with the Metatag module: Schema.org Metatag

From the module description: 


  This project extends Drupal's Metatag module to display structured data as JSON LD in the head of web pages. Read more about Schema.org, JSON LD, and how this module works in an article on Lullabot.com, Create SEO Juice From JSON LD Structured Data in Drupal.