4 ms·
That sounds like an entirely separate issue from what JWCC tries to achieve though. For programatically upgrading JSON config files, it's not just comments but
by crazygringo 6y ago
That sounds like an entirely separate issue from what JWCC tries to achieve though.
For programatically upgrading JSON config files, it's not just comments but whitespace, indentation, etc. that need to be preserved. Honestly that needs an entirely separate tool/library from normal JSON encoding and decoding -- e.g. special jwcc_insert() and jwcc_delete() functions that guarantee the file remains untouched (exact formatting preserved) except for the modified part.
It's really more akin to when your apache.conf file gets modified programatically -- everything is preserved exactly except for the specific lines that get touched/added.