Is it possible to create a decorator for a property of a class of type int so it serializes as a string?
I have
public class MyClass
{
[SerializeAsString] //this is what I want
public int StreetCode { get; set; }
}
so when I call
var jsonRequest = JsonConvert.SerializeObject(myClass);
I want it to output the value between quotes rather than as an int without quotes.