Sorry, not sure where to ask for help.
I have two classes, A and B. B inherits from A.
Class A{
public float a;
}
Class B:A{
public float b;
}
I would like to serialize class B and its float b variable, but ignore all serialization of variables inside Class A, and potentially ignoring serialization of Class A altogether if possible.
Newtonsoft.JSON has an OptIn attribute that does exactly this by marking variables with [JsonProperty], but it's not AOT compatible.
Sorry, not sure where to ask for help.
I have two classes, A and B. B inherits from A.
I would like to serialize class B and its float b variable, but ignore all serialization of variables inside Class A, and potentially ignoring serialization of Class A altogether if possible.
Newtonsoft.JSON has an OptIn attribute that does exactly this by marking variables with [JsonProperty], but it's not AOT compatible.