I have the following line in my .NET Core code :
var serializedstuff = Newtonsoft.Json.JsonConvert.SerializeObject(myuserclass);
What I want to do is to omit almost all fields with the exception of two in that specific serialization. I know I can annotate the class to make this happen, but I want to have a full serialization in all other cases except for this one.
Is it possible to do something like this?