fromJson static method

AssemblyDiagnostics fromJson(
  1. dynamic value
)

Returns a new AssemblyDiagnostics instance and imports its values from value if it's a Map, null otherwise.

Implementation

// ignore: prefer_constructors_over_static_methods
static AssemblyDiagnostics fromJson(dynamic value) {
  if (value is Map) {
    final json = value.cast<String, dynamic>();
    return AssemblyDiagnostics(
      name: mapValueOfType<String>(json, r'Name'),
      processor: mapValueOfType<String>(json, r'Processor'),
      assemblyVersion: mapValueOfType<String>(json, r'AssemblyVersion'),
      fileVersion: mapValueOfType<String>(json, r'FileVersion'),
      productVersion: mapValueOfType<String>(json, r'ProductVersion'),
      company: mapValueOfType<String>(json, r'Company'),
      copyright: mapValueOfType<String>(json, r'Copyright'),
      size: mapValueOfType<int>(json, r'Size'),
      lastModified: mapDateTime(json, r'LastModified', ''),
      dateCreated: mapDateTime(json, r'DateCreated', ''),
    );
  }
  return null;
}