Unparsable structured data errors

Highlighted
New Member
2 0 0

Hello community! 

 

I'm looking for some help with an issue with unparsable structured data. 

 

The product pages contain dimensions, and in the copy, double quotes are used as an abbreviation for inches. When the structured data is then generated, the double quotes are causing a problem with the markup: Missing ',' or '}' in object declaration::

 

example.png

Has anyone else come across this? Any ideas on a solution? 

 

Thanks in advance!

 

Josh

0 Likes
Highlighted
Shopify Partner
22 1 0

Escape it for example "name": "Small 1/2\" " (add backslash before the quote).

0 Likes
Highlighted
New Member
2 0 0

@AscentMV2 wrote:

Escape it for example "name": "Small 1/2\" " (add backslash before the quote).


Being that the structured data is auto-generated, how would I be able to build in this logic?

0 Likes
Highlighted
Shopify Partner
22 1 0

Use the liquid 'escape' string filter:

"name" : "{{ product.title | escape }}"

 

0 Likes