Adding structured data (json-ld) to vue

What’s the correct way to add json-ld to vue?

I’ve added some structured data but Google structured data testing tool does not detect on my url… But if I copy that url’s source into the testing tool it detects my data. I know I’m probably being thick here, but could someone enlighten me on what I’m doing wrong?