How can I implement XML similar to what I did with Json below:
I overridden JsonConverter class of Newtonsoft
public class DecimalFormatConverter : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteValue(string.Format("{0:N2}", value));
}
}
And add attribute for Total:
JsonConverter(typeof(DecimalFormatConverter))]
public decimal Total { get; set; }
Also, Where can I find a similar XMLConverter class to reuse? Newtonsoft only has JsonConverter