toJson method

  1. @override
Map<String, Object?> toJson()

Returns a JSON representation of this.

Implementation

@override
Map<String, Object?> toJson() => {
  'runtimeType': 'ZipFile',
  'compression-method': compressionMethod.toJson(),
  'last-modified-time': lastModifiedTime.toString(),
  'permissions': (permissions == null
      ? const None().toJson()
      : Option.fromValue(permissions).toJson()),
  'comment': comment,
  'file': file.toJson(),
  'crc32': crc32,
  'compressed-size': compressedSize.toString(),
  'extra-data': extraData.toList(),
  'is-dir': isDir,
  'enclosed-name': (enclosedName == null
      ? const None().toJson()
      : Option.fromValue(enclosedName).toJson()),
};