I am working on an HTML Poster Generator using Vue.js. I would like to save all the data as JSON and load all the data again from JSON.
I thought that this would be straight forward but the way I searched (maybe new to Vue.js) I did not find a way to load and save the whole data object. That would be this
?
I would like something like this:
export default Vue.extend({
// ...
computed: {
getDataAsJSON() {
return JSON.stringify(this);
},
setDataAsJSON(data) {
this.data = JSON.parse(data);
}
}
I will investigate further. Answers welcome.
Research: