Render crash when using JSON-LD script
Closed this issue · 2 comments
CptMaumau commented
When using a JSON-LD script in a view, it crashes.
Any idea of to fix it or is it a bug?
Here is an example of a JSON-LD script.
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"reviewCount": "11"
},
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
"name": "Kenmore White 17\" Microwave",
"image": "kenmore-microwave-17in.jpg",
"offers": {
"@type": "Offer",
"availability": "http://schema.org/InStock",
"price": "55.00",
"priceCurrency": "USD"
},
}
</script>
yannik-b commented
It's easy. Vash used the @ Syntax to identify a variable. So your json ld takes vash to think @context should be a variable, but it isn't.
Try adding a backslash before every @ to tell vash it is a string.
CptMaumau commented
Thank you that was it!
The way to fix is to put another @ before, I had a similar issue recently but forgot about that.