ServerInformation.fromJson constructor
Implementation
factory ServerInformation.fromJson(Map<String, Object?> json) {
return ServerInformation(
baseUrl: json[r'baseUrl'] as String?,
buildDate: DateTime.tryParse(json[r'buildDate'] as String? ?? ''),
buildNumber: (json[r'buildNumber'] as num?)?.toInt(),
deploymentType: json[r'deploymentType'] as String?,
healthChecks: (json[r'healthChecks'] as List<Object?>?)
?.map((i) => HealthCheckResult.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
scmInfo: json[r'scmInfo'] as String?,
serverTime: DateTime.tryParse(json[r'serverTime'] as String? ?? ''),
serverTitle: json[r'serverTitle'] as String?,
version: json[r'version'] as String?,
versionNumbers: (json[r'versionNumbers'] as List<Object?>?)
?.map((i) => (i as num?)?.toInt() ?? 0)
.toList() ??
[],
);
}