Reputation: 1345
I am trying to create a JSON string and then turn it into a QRCode using vue-qrcode-component
. This is where I am creating the string:
this.qrCode = "{‘type’:’serialNumber’,’id’:25434,’stock_id’:736,’stock_order_id’:’655’}";
And then in the template:
<qr-code :text="qrCode"></qr-code>
But I keep getting this when scanning the generated qr:
{type:serialNumber,id:25434,stock_id:736,stock_order_id:655}
So I am losing the quotes which I need for it to be formatted correctly. I have tried escaping '
with ` but this hasn't worked
Any suggestions
Upvotes: 1
Views: 405