Here is the Json data I am attempting to represent using Json-LD :
var schemaOrg = angular.toJson({
"@context": "http://schema.org",
"@type": "RealEstateAgent",
"RealEstateAgent": {
"@type": "RealEstateAgent",
"address": "123, Xyz Tower, ajkshjask",
"areaServed": "Chicago",
"brand": "My Brand",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6a0b08092a0d070b030644090507">[email protected]</a>",
"knowsLanguage": "English",
"legalName": "Jerry Kon",
"image": "http:samplepic.com",
"description": "I am great",
"name": "Jerry Kon",
"url": "http:myprofilepic.com",
"Telephone": "1234567899"
}
});
This is how I am rendering it:
<script type="application/ld+json" id="json-ld-music-group"></script>
angular.element(document).ready(function () {
var jsonLd = angular.element(document.getElementById('json-ld-music-group'))[0];
console.log(jsonLd);
jsonLd.innerHTML = schemaOrg;
console.log(jsonLd.innerHTML);
});
When I copy and paste the entire HTML and test in Google Structured Data Testing tool, I receive a warning and error that I do not understand. The tool flags the name and image
properties even though they are present in my data. It also warns about the address and telephone fields. Can someone assist me in resolving this issue?