Parsing error: Missing ',' or '}' in Rich Result Test tool by Google

915 Views Asked by At

I run this code on Google rich result tool and it shows me this error on line 21-25 Parsing error: Missing ',' or '}', I was trying to find where the missing comma or bracket was but did not quite get it, if anyone knows where the problem is, much appreciated. I also used Google structured data testing tool and it is also showing me error on line 21

Here is the code:

     <script data-desc="seo-organization" type="application/ld+json">
     {
     "@context": "http://schema.org",
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization",
     "name": "Stock Photo Tees",
     "url": "https://stockphototees.com","logo": {
     "type": "ImageObject",
     "url": "https://cdn.shopify.com/s/files/1/1501/0626/t/25/assets
    /pluginseo_structuredDataLogo_small.png?v=6356307188231393273"
     },
     "image": "https://cdn.shopify.com/s/files/1/1501/0626/t/25/assets
    /pluginseo_structuredDataLogo_small.png?v=6356307188231393273","
    sameAs": ["https://www.facebook.com/stockphototees"]
     }
    </script><script data-desc="seo-product" type="application/ld+json">
     {
     "@context": "http://schema.org/",
     "@type": "Product",
     "@id": "https://stockphototees.com/products/firm-handshakebetween-business-associates#product",
     "name": "Firm Handshake Between "Business Associates" sweatshirt",
     "image": "https://cdn.shopify.com/s/files/1/1501/0626/products
    /firm_handshake_between_business_associates_-
    _adobe_stock_apparel_450x450.png?v=1600273744",
     "description": "Put. That coffee. Down. Coffee&#39;s for closers
    only. Nothing says you do business more than this iconic handshake
    image. Always be closing: wear this sweatshirt. Sizing information ",
     "mpn": "7865498313",
     "brand": {
     "@type": "Thing",
     "name": "Stock Photo Tees"
     },
     "offers": {
     "priceCurrency": "USD",
     "lowPrice":30.99,
     "highPrice":30.99,
     "availability": "OutOfStock",
     "offerCount":1,
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     },
     "model": [{
     "@type": "ProductModel",
     "@id": "https://stockphototees.com/products/firmhandshake-between-business-associates#productModel=25326698121",
     "url": "https://stockphototees.com/products/firmhandshake-between-business-associates?variant=25326698121",
     "name": "Firm Handshake Between Business Associates
    sweatshirt XS",
     "mpn": "25326698121","sku": "","weight": {
     "@type": "QuantitativeValue",
     "value": 292,
     "unitCode": "GRM"
     },
    "additionalProperty": [{
     "@type": "PropertyValue",
     "name": "Size",
     "value": "XS"
     }],"image": "https://cdn.shopify.com/s/files/1/1501
    /0626/products/mockup-f75a6cd3_450x450.jpg?v=1600273720",
     "offers": {
     "@type": "Offer",
     "priceCurrency": "USD",
     "availability": "OutOfStock",
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     }
     },{
     "@type": "ProductModel",
     "@id": "https://stockphototees.com/products/firmhandshake-between-business-associates#productModel=25326698185",
     "url": "https://stockphototees.com/products/firmhandshake-between-business-associates?variant=25326698185",
     "name": "Firm Handshake Between Business Associates
    sweatshirt S",
     "mpn": "25326698185","sku": "","weight": {
     "@type": "QuantitativeValue",
     "value": 306,
     "unitCode": "GRM"
     },
    "additionalProperty": [{
     "@type": "PropertyValue",
     "name": "Size",
     "value": "S"
     }],"image": "https://cdn.shopify.com/s/files/1/1501
    /0626/products/mockup-f75a6cd3_450x450.jpg?v=1600273720",
     "offers": {
     "@type": "Offer",
     "priceCurrency": "USD",
     "price":30.99,
     "availability": "OutOfStock",
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     }
     },{
     "@type": "ProductModel",
     "@id": "https://stockphototees.com/products/firmhandshake-between-business-associates#productModel=25326698249",
     "url": "https://stockphototees.com/products/firmhandshake-between-business-associates?variant=25326698249",
     "name": "Firm Handshake Between Business Associates
    sweatshirt M",
     "mpn": "25326698249","sku": "","weight": {
     "@type": "QuantitativeValue",
     "value": 323,
     "unitCode": "GRM"
     },
    "additionalProperty": [{
     "@type": "PropertyValue",
     "name": "Size",
     "value": "M"
     }],"image": "https://cdn.shopify.com/s/files/1/1501
    /0626/products/mockup-f75a6cd3_450x450.jpg?v=1600273720",
     "offers": {
     "@type": "Offer",
     "price":30.99,
     "availability": "OutOfStock",
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     }
     },{
     "@type": "ProductModel",
     "@id": "https://stockphototees.com/products/firmhandshake-between-business-associates#productModel=25326698313",
     "url": "https://stockphototees.com/products/firmhandshake-between-business-associates?variant=25326698313",
     "name": "Firm Handshake Between Business Associates
    sweatshirt L",
     "mpn": "25326698313","sku": "","weight": {
     "@type": "QuantitativeValue",
     "value": 366,
     "unitCode": "GRM"
     },
    "additionalProperty": [{
     "@type": "PropertyValue",
     "name": "Size",
     "value": "L"
     }],"image": "https://cdn.shopify.com/s/files/1/1501
    /0626/products/mockup-f75a6cd3_450x450.jpg?v=1600273720",
     "offers": {
     "@type": "Offer",
     "priceCurrency": "USD",
     "price":30.99,
     "availability": "OutOfStock",
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     }
     },{
     "@type": "ProductModel",
     "@id": "https://stockphototees.com/products/firmhandshake-between-business-associates#productModel=25326698441",
     "url": "https://stockphototees.com/products/firmhandshake-between-business-associates?variant=25326698441",
     "name": "Firm Handshake Between Business Associates
    sweatshirt XL",
     "mpn": "25326698441","sku": "","weight": {
     "@type": "QuantitativeValue",
     "value": 377,
     "unitCode": "GRM"
     },
    "additionalProperty": [{
     "@type": "PropertyValue",
     "name": "Size",
     "value": "XL"
     }],"image": "https://cdn.shopify.com/s/files/1/1501
    /0626/products/mockup-f75a6cd3_450x450.jpg?v=1600273720",
     "offers": {
     "@type": "Offer",
     "priceCurrency": "USD",
     "price":30.99,
     "availability": "OutOfStock",
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     }
     },{
     "@type": "ProductModel",
     "@id": "https://stockphototees.com/products/firmhandshake-between-business-associates#productModel=25326698505",
     "url": "https://stockphototees.com/products/firmhandshake-between-business-associates?variant=25326698505",
     "name": "Firm Handshake Between Business Associates
    sweatshirt 2XL",
     "mpn": "25326698505","sku": "","weight": {
     "@type": "QuantitativeValue",
     "value": 465,
     "unitCode": "GRM"
     },
    "additionalProperty": [{
     "@type": "PropertyValue",
     "name": "Size",
     "value": "2XL"
     }],"image": "https://cdn.shopify.com/s/files/1/1501
    /0626/products/mockup-f75a6cd3_450x450.jpg?v=1600273720",
     "offers": {
     "@type": "Offer",
     "priceCurrency": "USD",
     "price":30.99,
     "availability": "OutOfStock",
     "seller": {
     "@type": "Organization",
     "@id": "https://stockphototees.com#organization"
     }
     }
     }]
     }}
     </script>
1

There are 1 best solutions below

4
weirdan On

Since that's just a JSON, put the contents of your script tags into any JSON editor (e.g. https://jsoneditoronline.org, but any other would work too) and it will point out the issue. One particular issue you have (there may be other) is prematurely ended string here:

     "name": "Firm Handshake Between "Business Associates" sweatshirt",

Here, embedded quotes should be escaped like this:

     "name": "Firm Handshake Between \"Business Associates\" sweatshirt",

Another problem there is that there are embedded literal newlines for description property. You would need to either strip them or replace with \n.