Is it possible to specify a different name for a Json property when serializing vs de-serializing? For example, if we have the following class (in c#):-
public class SomeClass
{
[JsonProperty("Is New Product")]
public bool IsNewProduct { get; set; }
}
We are using the "Is New Product" property to aid de-serialization as we are unable to control the name within the Json. When we re-serialize the class we want to retain the C# property name "IsNewProduct", but (as expected) it serializes as "Is New Product".
Is it possible to specify different property names for Serialization vs De-Serialization, or somehow stipulate to ignore the JsonProperty name when serializing?