Not able to include the below code in pugjs. I am getting errors.
<body>
<amp-state id="theFood">
<script type="application/json">
{
"cupcakes": {
"imageUrl": "https://amp.dev/static/samples/img/image2.jpg",
"style": "greenBorder"
},
"sushi": {
"imageUrl": "https://amp.dev/static/samples/img/image3.jpg",
"style": "redBorder"
}
}
</script>
</amp-state>
I converted in pugjs as
amp-state#theFood
script(type="application/json").
{
"cupcakes": {
"imageUrl": "https://amp.dev/static/samples/img/image2.jpg",
"style": "greenBorder"
},
"sushi": {
"imageUrl": "https://amp.dev/static/samples/img/image3.jpg",
"style": "redBorder"
}
}
But I am getting the below error. Does pugjs doesn't support JSON format? What Am I missing?
Complete error message in short