1

I was wondering if you could help me find out what is wrong with this JSON schema.

I have reviewed it a thousand times and I am still getting the same error on line 10 (administrationRoute).

Even when I delete that line, I keep getting errors for all the lines under it. These are all properties, so I have no idea what's going on.

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Brand X Information for Healthcare Professionals",
"mainEntity": {
"@type": "Drug",
"name": "Name",
"activeIngredient": "Cysteamine Hydrochloride",
“administrationRoute”: “Ophthalmic”,
“drugUnit”: “0.44% Cysteamine Ophthalmic Solution”,
“dosageForm”: “Topical Solution”,
“manufacturer”: {
  "@type": "Organization",
  "name": “Company Name”
  },
“mechanismOfAction”: “Cysteamine, the active ingredient in BrandX, is an aminothiol that depletes lysosomal cystine, preventing buildup of cystine crystals in bodily tissues. Within lysosomes, cysteamine interacts with cystine to form cysteine and cysteine–cysteamine mixed disulfide. These substances can pass through the lysosomal membrane and be eliminated from the cell.”
}
}
</script>

1 Answer 1

2

Your problem is smart quotes. You use them. JSON can't have them. JSON has to have regular old dumb quotes. Up until line 10, you use the correct quotation marks, but then at line 10 you switch to using fancy slanted quotation marks.

The solution is to use find and replace to find the smart quotes and replace them with dumb quotes. I would also clean up the indentation. Then you end up with:

<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "WebPage",
    "name": "Brand X Information for Healthcare Professionals",
    "mainEntity": {
      "@type": "Drug",
      "name": "Name",
      "activeIngredient": "Cysteamine Hydrochloride",
      "administrationRoute": "Ophthalmic",
      "drugUnit": "0.44% Cysteamine Ophthalmic Solution",
      "dosageForm": "Topical Solution",
      "manufacturer": {
        "@type": "Organization",
        "name": "Company Name"
      },
      "mechanismOfAction": "Cysteamine, the active ingredient in BrandX, is an aminothiol that depletes lysosomal cystine, preventing buildup of cystine crystals in bodily tissues. Within lysosomes, cysteamine interacts with cystine to form cysteine and cysteine\u2013cysteamine mixed disulfide. These substances can pass through the lysosomal membrane and be eliminated from the cell."
    }
  }
</script>

This is usually caused by trying to edit in a word processor such as Microsoft Word, Google docs, or Libreoffice. For code, you should avoid using these programs. Find a text editor built for programmers. Such an editor won't try to smarten your quotes for you.

2
  • Thank you so much, I feel really dumb!
    – Mark
    Feb 22, 2021 at 15:48
  • You are not dumb, if anything, you and your quotes were too smart. :-) Feb 22, 2021 at 16:10

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.