HTL issue
I am trying to add a JSON-LD script through a component in HTML. I created an HTML file named productjson.html where I added the below script:
<sly data-sly-use.product="com.**.**.**.******.Product">
<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "Product",
"offers": "${product.offersjson}",
}
</script>
</sly>
Then, in the component's main HTML file, I included the productjson.html using the following tag:
<sly data-sly-include="productjson.html" />
output: in view page source in getting
<
ACTUAL:
"offers": [
{
"image": "https:/in_1.jpg",
,
"priceCurrency": "USD",
"price": 38,
},]
EXPECTED
"offers": [
{
"image": "https:/in_1.jpg",
"priceCurrency" :"usd"
"price" : "38"
},]
some decoding issue, if i try print that json in page it is getting properly from backend but in view page source " getting add