I have a settings.json
file full with useful comments (sometimes C-style and sometimes Python), and I'm programmatically modifying them with eg json
library, but when I save the modified one I lose all the comments explaining the fields. Another inconvenience is losing the indentations and spacing therein.
Is there a 'neat' way of modifying the file programmatically?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.