Metafield shows up in Shopify Admin as JSON
{“foo”: “bar”}
So that is saved as product.metafields.fracking.frooking in a JSON typed field
But when rendering this metafield in a theme app extension as part of a logical dump of useful data, it renders as uncouth data. Unprocessed JSON. ie
<custom-element data-mymassive-dump-smells={{ product.metafields.fracking.frooking.value }}>
Which in turn is rendering as an HTML element with a messy dataset.
<custom-element data-mymassive-dump-smells="{“foo”=>“bar”}>
Which is neat. So to recap. In the Admin it is perfect JSON. The code that creates the data in the first place saves it as JSON. But when Shopify renders the liquid, it barfs out an unconverted string.
How?