public static byte[] SerializeToUtf8Json(this ChecksumFile checksumFile) { var options = new JsonSerializerOptions { WriteIndented = true, }; options.Converters.Add(new JsonStringEnumConverter()); return(JsonSerializer.SerializeToUtf8Bytes(checksumFile, options)); }
// CAUTION: This doesn't check for duplicate roots inside a list. public static ComparisonFile Compare(ChecksumFile left, ChecksumFile right) { return(new ComparisonFile(Compare(left.ChecksumCollections, right.ChecksumCollections))); }