Search code examples
htmlreactjsnext.jsgoogle-search

Google Rich Result Testing Tool Error: Parsing error: Missing ‘}’ or object member name


My website: www.bharatpharmatech.com My code is in nextjs My Schema Is:

{ "@context": "https://schema.org/", "@type": "WebSite", "name": "Bharat Pharmatech", "url": "https://bharatpharmatech.com", "potentialAction": { "@type": "SearchAction", "target": "https://bharatpharmatech.com/search/{search_term_string}", "query-input": "required name=search_term_string" } } Note: I have did not added any extra commas

I don't know why google converting "(double quote) to " Google Schema Markup Tool Parsing: {"@context":"https://schema.org","@type":"Corporation","name":"Bharat Pharmatech","alternateName":"Pharma Machinery & Spares","url":"https://bharatpharmatech.com","logo":"https://res.cloudinary.com/dzainnrtc/image/upload/v1677398892/apple-touch-icon_cvh6w8.png","contactPoint":[{"@type":"ContactPoint","telephone":"9687849837","contactType":"customer service","contactOption":"TollFree","areaServed":"IN","availableLanguage":["en","Hindi","Marathi","Gujarati"]},{"@type":"ContactPoint","telephone":"0901507751","contactType":"technical support","contactOption":"TollFree","areaServed":"IN","availableLanguage":["en","Hindi","Marathi","Gujarati"]}],"sameAs":["www.bharatpharmatech.com","https://youtube.com/@pharmamachineryspares","https://instagram.com/bharatpharmatech"]}

I have tried to changing my code but do not worked


Solution

  • look at your source code page not in inspect mode on you browser because quote are interpreted.

    curl https://bharatpharmatech.com/
    

    Or with option view source on your browser

    It seems to be your nextjs output which generate the quote escaping