Using vue-i18n, to use the < i18n > tag in a .vue file, how to format the JSON in it

The

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


has found a solution. When node is written, JSON.stringify () is called to serialize the object into a string, and stringify receives the third parameter, which is used to format the output.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4279d-44145.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4279d-44145.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?