I have a C# Application.
I have a class that is generated from an xsd. The class looks as below
public class Transaction
{
public bool amountSpecified {get; set;}
public double amount {get; set;}
}
If you notice in the class above, along with the property amount, the generator has also generated a property called amountSpecified.
I know that the properties with suffix "Specified" are required for all non-nullable field/property, because this is the requirement of XML Serializer as mentioned in this [article][1].
However I only use JSON serialization and deserialization(with JSON.NET), do I still need those fields with "Specified" suffix? If I remove them should I make my fields/properties nullable as shown below?
double? amount;
My question being is all of this internally handled by JSON.Net? Can I safely remove all the fields with suffix "specified" and not make my fields nullable?
I would be very glad if someone can point me in the right direction. Thanks in Advance.