DocumentIdentifier.fromJson constructor

DocumentIdentifier.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DocumentIdentifier.fromJson(Map<String, dynamic> json) {
  return DocumentIdentifier(
    author: json['Author'] as String?,
    documentFormat: (json['DocumentFormat'] as String?)?.toDocumentFormat(),
    documentType: (json['DocumentType'] as String?)?.toDocumentType(),
    documentVersion: json['DocumentVersion'] as String?,
    name: json['Name'] as String?,
    owner: json['Owner'] as String?,
    platformTypes: (json['PlatformTypes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toPlatformType())
        .toList(),
    requires: (json['Requires'] as List?)
        ?.whereNotNull()
        .map((e) => DocumentRequires.fromJson(e as Map<String, dynamic>))
        .toList(),
    reviewStatus: (json['ReviewStatus'] as String?)?.toReviewStatus(),
    schemaVersion: json['SchemaVersion'] as String?,
    tags: (json['Tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    targetType: json['TargetType'] as String?,
    versionName: json['VersionName'] as String?,
  );
}