Как проверить JSON -LD микроданных против схемы schema.org с Javascript? - PullRequest
1 голос
/ 02 мая 2020

Я пытаюсь проверить набор https://schema.org отформатированных JSON -LD файлов (100+), чтобы убедиться, что они следуют правилам schema.org. Но мне трудно найти работающую библиотеку JS / PHP / Python с примером.

Лучшее, что я смог найти, это https://github.com/chharvey/schemaorg-jsd, но, похоже, он заброшен и никогда не находит проблем с моими файлами, даже в явно сломанных.

I Буду признателен за любую помощь, ссылку на рабочий репозиторий Github, статью, пример кода.

Вот один файл, например:

{
    "@context": "http://schema.org",
    "@type": "Article",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://moz.com/blog/best-free-seo-tools"
    },
    "headline": "The 60 Best Free SEO Tools [100% Free]",
    "image": {
        "@type": "ImageObject",
        "url": "https://moz.com/uploads/og_image/5d4b2923e22013.80121530.jpg",
        "height": 440,
        "width": 880
    },
    "datePublished": "2019-06-10T00:04:00-07:00",
    "dateModified": "2020-03-11T13:17:16-07:00",
    "author": {
        "@type": "Person",
        "name": "Cyrus Shepard",
        "sameAs": [
            "https://moz.com/community/users/155620",
            "https://twitter.com/cyrusshepard"
        ]
    },
    "publisher": {
        "@type": "Organization",
        "name": "Moz",
        "url": "https://moz.com",
        "sameAs": [
            "https://twitter.com/moz",
            "https://www.facebook.com/moz/",
            "https://www.youtube.com/user/MozHQ",
            "https://www.linkedin.com/company/moz",
            "https://www.instagram.com/moz_hq/",
            "https://www.pinterest.com/mozhq/"
        ],
        "logo": {
            "@type": "ImageObject",
            "url": "https://d2eeipcrcdle6.cloudfront.net/brand-guide/logos/moz_blue.png",
            "width": 134,
            "height": 39
        }
    },
    "description": "There are literally hundreds of free SEO tools out there, so we focused on only the best and most useful to add to your toolbox."
}

Заранее спасибо.

...