I would like to add to my pages the structured data in JSON-LD (https://developers.google.com/search/docs/guides/intro-structured-data)
Basically, what I need to do is to add somewhere in the HTML for, let’s say a basic page, a snippet like the following:
<script type="application/ld+json"> { "@context":"http://schema.org", "@type":"WebSite", "name":"Site name", "alternateName":"Site alternatime name", "description":"Site description", "keywords":"list of keyword", "inLanguage":"en", "url":"http://www.example.eu/en", "potentialAction":{ "@type":"SearchAction", "target":"http://www.example.com/en/find/{search_term_string}", "query-input":"required name=search_term_string" } } </script>
I’ve tried to use the full HTML input but the snippet gets (kind of) escaped with the CDATA and google cannot parse it.
So, how can I provide that snippet without any escaping?