I'm trying to mark up an article with structured data. For this particular article I've found it a lot cleaner and simpler to use JSON rather than Microdata. In Google's Structured Data Testing Tool this script works fine with no errors:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://my_website/my_article.php"
},
"author": "My name",
"name": "My article",
"headline": "My article",
"datePublished": "2017-06-10",
"dateModified": "2017-07-23",
"image":{"@type":"ImageObject","url":"https://my_website/images/my_logo.png","height":768, "width":782},
"publisher" : {
"@type": "Organization",
"name": "My site name",
"logo":{"@type":"ImageObject","url":"https://my_website/images/my_banner.png","height":60, "width":600}
}
}
However, the article body is very long so I don't want to put that in the script via articleBody. Instead I've used Microdata:
<div itemscope itemtype="http://schema.org/Article" class="col-md-8">
<div itemprop="articleBody" class="card">
<!-- Rest of my HTML -->
As soon as I do this the testing tool gives an error for every single item in my JSON, saying those fields are required.
Is there a way to do this without duplicating 3,000 lines of content into the JSON script articleBody?