@visibleForTesting Map<String, dynamic> toJson() => { "api": api, "core": core, "coreMode": coreMode, "database": database?.toJson() }.clearNulls();