Refactor OpenInsight file handling to utilize JsonElement for data processing and enhance serialization with JsonSourceGeneration. Updated methods across multiple classes to improve data handling and reduce dependencies on ProcessDataStandardFormat.
This commit is contained in:
@ -1,16 +1,30 @@
|
||||
namespace Adaptation.FileHandlers.RsM;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.RsM;
|
||||
|
||||
public class Detail
|
||||
{
|
||||
|
||||
public string HeaderUniqueId { get; set; }
|
||||
public string Merit { get; set; }
|
||||
public string Pt { get; set; }
|
||||
public string R { get; set; }
|
||||
public string Rs { get; set; }
|
||||
public string T { get; set; }
|
||||
[JsonPropertyName("MeritGOF")] public string Merit { get; set; }
|
||||
[JsonPropertyName("InferredPoint")] public string Pt { get; set; }
|
||||
[JsonPropertyName("R")] public string R { get; set; }
|
||||
[JsonPropertyName("Rs")] public string Rs { get; set; }
|
||||
[JsonPropertyName("Th")] public string T { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
|
||||
public override string ToString() => string.Concat(Merit, ";", Pt, ";", R, ";", Rs, ";", T);
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
[JsonSerializable(typeof(Detail))]
|
||||
internal partial class DetailSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
[JsonSerializable(typeof(Detail[]))]
|
||||
internal partial class DetailArraySourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user