using System.Text.Json.Serialization;
tempType = TempType.Type2
System.Console.WriteLine(JsonSerializer.Serialize(tmpObj));
[JsonPropertyName("type")]
public TempType tempType { get; set; }
public string MyOtherAttribue { get; set;}
public class TempType(string value)
public string Value { get; init; } = value;
public static TempType Type1 => new("Type1");
public static TempType Type2 => new("Type2");
public override string ToString()