|
|
|
|
|
by tonyedgecombe
2047 days ago
|
|
I don't know about JSON but the XML serialisation code checks for a DefaultValue attribute and if the value is the default it ignores it on serialisation. You can also ignore properties if they don't need serialisation. Your example looks sloppy but it can get messy as the project evolves. I had some code where I mistakenly removed some XmlAttribute attributes in one release and it was painful to resolve in the next release. Having said that I will still use it again, just carefully. |
|