mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use source generator for device report JSON serializing.
This commit is contained in:
@@ -59,6 +59,13 @@ using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
|
||||
|
||||
namespace Aaru.CommonTypes.Metadata;
|
||||
|
||||
|
||||
// ReSharper disable once PartialTypeWithSinglePart
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
||||
IncludeFields = true)]
|
||||
[JsonSerializable(typeof(DeviceReport))]
|
||||
public partial class DeviceReportContext : JsonSerializerContext {}
|
||||
|
||||
public class DeviceReport
|
||||
{
|
||||
[JsonIgnore]
|
||||
|
||||
Reference in New Issue
Block a user