lib/qx/tool/compiler/utils/Json.js
async function(filename, data) {
      if (!data) {
        if (await fs.existsAsync(filename)) {
          fs.unlinkAsync(filename);
        }
      } else {
        await fs.writeFileAsync(filename, JSON.stringify(data, null, 2), "utf8");
      }
    }
async function(filename, data) {
      if (!data) {
        if (await fs.existsAsync(filename)) {
          fs.unlinkAsync(filename);
        }
      } else {
        await fs.writeFileAsync(filename, JSON.stringify(data, null, 2), "utf8");
      }
    }
Saves JSON data to a file, or erases the file if data is null

@param filename {String} filename to write to
@param data {Object?} the data to write