#json-file-plus 

A module to read from and write to JSON files, without losing formatting, to minimize diffs.
Example
var jsonFile = require('json-file-plus');
jsonFile.read('package.json', function (err, file) {
if (err) { return doSomethingWithError(err); }
file.data;
file.format;
file.get('version');
file.get('version', callback);
file.get();
file.get(callback);
file.set({
foo: 'bar',
bar: {
baz: true
}
});
file.save('new-package.json', fsWriteFileCallback);
});
Tests
Simply run npm test
in the repo