project uses vue-i18n, tags like this in the .vue file. I use node to extract the json from < i18n > in all the .vue files into a json file. After the translator has translated it, the translator writes it back to the .vue with node, and then there is no formatting information and becomes a line
.<i18n>
{
"CN": {
"hello":""
},
"EN": {
"hello":"hi"
}
}
</i18n>
after node is written:
<i18n>
{"CN": {"hello":""},"EN": {"hello":"hi"}}
</i18n>
how can I format this piece of code