text: import { TextFile } from './TextFile.js';
  export class JSONFile {
      constructor(filename) {
          this.adapter = new TextFile(filename);
      }
      async read() {
          const data = await this.adapter.read();
          if (data === null) {
              return null;
          }
          else {
              return JSON.parse(data);
          }
      }
      write(obj) {
          return this.adapter.write(JSON.stringify(obj, null, 2));
      }
  }
  