我的BlogPosting代码有什么问题? "失踪'}'或对象成员名称。"

时间:2018-02-15 14:43:25

标签: json validation schema.org json-ld

我一直在处理这个BlogPosting架构,我通过Google测试工具运行它,最后我看到一条错误消息:

  

JSON-LD error: "Missing '}' or object member name."

<script type="application/ld+json">
    { 
     "@context": "http://schema.org", 
     "@type": "BlogPosting",
     "mainentityofpage": "https://www.northcountrylaw.com",
     "headline": "14 Ways Json Can Improve Your SEO",
     "alternativeHeadline": "and the women who love them",
     "image": "http://example.com/image.jpg",
     "award": "Best article ever written",
     "editor": "John Doe", 
     "genre": "search engine optimization", 
     "keywords": "seo sales b2b", 
     "wordcount": "1120",
      "Publisher": {
        "@type": "Organization",
        "name": "Cat's Meow",
        "logo": {
                "@type": "ImageObject",
                "name": "Cats cats cats",
                "width": "1024",
                "height": "1024",
                "url": "https://www.greatcats.png"
                     }
        },
    "url": "http://www.example.com",
    "datePublished": "2015-09-20",
     "dateCreated": "2015-09-20",
     "dateModified": "2015-09-20",
     "description": "We love to do stuff to help people and stuff",
     "articleBody": "You can paste your entire post in here, and yes it can get really really long.",
       "author": {
        "@type": "Person",
        "name": "kitten boots"
     },
    </script>

1 个答案:

答案 0 :(得分:1)

JSON-LD错误

  • 您有四个@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { View v = inflater.inflate(R.layout.training1_fragment, container, false); setHasOptionMenu(true); return v; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_save : { //Write here what to do you on click return true; } } return super.onOptionsItemSelected(item); } ,但只有三个{
  • 您在最后}之后有一个,,但后面没有任何内容。

因此,您必须删除逗号并关闭}

author

Schema.org错误

Schema.org术语区分大小写。它必须是:

  • "author": { "@type": "Person", "name": "kitten boots" } } 代替publisher
  • Publisher代替mainEntityOfPage
  • mainentityofpage代替wordCount