1

My review schema gives an error:

Missing '}' or object member name.

See the below schema and screenshot:

<script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Review",
      "itemReviewed": {
        "@type": "Organization",
        "image": "https://www.yarddiant.com/web-development-company.png",
        "name": "Yarddiant",
        
        }
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5"
      },
      "name": "I have been working with Yarddiant for few projects and it's been nothing but great experiences by far. They are very professional and extremely responsible everytime I ask for updates or changes on projects. Highly recommended!!",
      "author": {
        "@type": "Person",
        "name": "Johan L."
      },
      
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5"
      },
      "name": "Recommend as the best offshore web development company",
      "author": {
        "@type": "Person",
        "name": "Vyshakh S."
      },
      
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5"
      },
      "name": "Best Web Support Consultants",
      "author": {
        "@type": "Person",
        "name": "Abel M."
      },
      
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5"
      },
      "name": "I have been working in partnership with yarddiant for long term . They are one of the best web development companies that could meet the USA standards.",
      "author": {
        "@type": "Person",
        "name": "Sreesh D."
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5"
      },
      "name": "The best web company to work with. Friendly, fast work and the best Quality.",
      "author": {
        "@type": "Person",
        "name": "Rickard B."
      }
      
    }
    </script>

You can see the source also:

4
  • I think the error message about your curly braces is pretty spot on. Have you tried formatting your code so that they are well balanced? Aug 16, 2022 at 18:33
  • 1
    "name": "Yarddiant", ... remove the comma
    – Wayne
    Aug 16, 2022 at 22:21
  • That error message should read "found a comma missing object name or do you want the change the comma to a }?" ... the } is not missing!
    – Wayne
    Aug 16, 2022 at 22:28
  • @Wayne, why not add that as an answer so it can be accepted (hopefully) and be a useful reference for future visitors.
    – Steve
    Aug 17, 2022 at 0:41

1 Answer 1

2

The error message is misleading.

I'm posting because that error message should be fixed. The question actually has a typo, addressed in comments.

The message says "Missing '}'" and has caused countless hours of people checking that the '}' which is not missing.

In fact I've noticed the question have an extra "}"

{
  "@context": "https://schema.org/",
  "@type": "Review",
  "itemReviewed": {
    "@type": "Organization",
    "image": "https://www.yarddiant.com/web-development-company.png",
    "name": "Yarddiant",
    
    }
  }, 

should be,

{
  "@context": "https://schema.org/",
  "@type": "Review",
  "itemReviewed": {
    "@type": "Organization",
    "image": "https://www.yarddiant.com/web-development-company.png",
    "name": "Yarddiant"
    
    },

The comma after the "Yarddiant" is setting up an expectation for another object, but there isn't one instead there is a NOT MISSING '}' and after the object, "itemReviewed" there are more objects. So we need a "},"

The pattern is:

{
   "object1": "value1" // no comma because no more objects.
}
// or
{
   "object1": "value1", // comma because there is another object.
   "object2": "value2"
}

and values can be {} objects, but the "," exists after the value unless it is the last value.

The "or object member name" is more correct.

The message should say,

Found '}' when expecting object member name at line number

The '}' is not missing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.