async toJson()

in lib/Server.ts [54:68]


  async toJson(): Promise<ServerJSON> {
    const databases = await this.databases();
    const dbsJson: DatabaseJSON[] = [];
    for (const database of databases) {
      const json = await database.toJson();
      dbsJson.push(json);
    }
    Utils.fieldSort(dbsJson, 'name');

    return {
      name:      this.name,
      size:      this.size,
      databases: dbsJson
    }
  }