I am using the Web API with DataContract serialization. The result is as follows:
<Data> <Status> <Date>2014-08-13T00:30:00</Date> <ID>312</ID> <Option>No Limitation</Option> <Value i:nil="true" /> </Status> <Status> <Date>2014-08-13T01:00:00</Date> <ID>312</ID> <Option>No Limitation</Option> <Value i:nil="true" /> </Status> <Status> <Date>2014-08-13T01:30:00</Date> <ID>312</ID> <Option>No Limitation</Option> <Value i:nil="true" /> </Status> <Status> <Date>2014-08-13T02:00:00</Date> <ID>312</ID> <Option>No Limitation</Option> <Value i:nil="true" /> </Status>
I managed to remove all the extra namespaces by doing:
[DataContract(Namespace="")] public class Status
But the only attribute remains the i:nil attribute. What should I do to remove the i: nil attribute?
source share