I'm using System.Text.Json.Serialization; to ignore attribute on serialization with [JsonIgnore] annotation. exemple:
[JsonIgnore]
public string Name { get; set; }
Is this a way to use a custom condition with [JsonIgnore]?
for example
[JsonIgnore=someFunctionThatReturnsBoolean()]
public string Name { get; set; }