function rewriteJSONFile(filePath, rewriteFile, generator) {
    const jsonObj = generator.fs.readJSON(filePath);
    rewriteFile(jsonObj, generator);
    generator.fs.writeJSON(filePath, jsonObj, null, 2);
}
function rewriteJSONFile(filePath, rewriteFile, generator) {
    const jsonObj = generator.fs.readJSON(filePath);
    rewriteFile(jsonObj, generator);
    generator.fs.writeJSON(filePath, jsonObj, null, 2);
}
function rewriteJSONFile ( filePath , rewriteFile , generator ) { const jsonObj = generator . fs . readJSON ( filePath ) ; rewriteFile ( jsonObj , generator ) ; generator . fs . writeJSON ( filePath , jsonObj , null , 2 ) ; }
Rewrite JSON file

@param {string} filePath file path
@param {function} rewriteFile rewriteFile function
@param {object} generator reference to the generator
Rewrite JSON file
Rewrite a JSON file