Map<String, dynamic> toJson() { return { 'format': format.name, 'size': size.toJson(), 'bytes': bytes.toJson(), }; }