Browsed by
Tag: ISO 8601

JSON Date Serialization C# Snippet

JSON Date Serialization C# Snippet

When exposing .Net DateTime members to service consumers the .Net format is not always appropriate because the consumer may not be on the .Net platform. Therefore it’s best to use the ISO 8601 standard. Serialization is performed in .Net by using the OnSerializing attribute, and deserialization by using the OnDeserialized attribute. I created a Visual Studio snippet that writes the code that enables you to serialize/deserialize your DateTime member. Once added to your Snippets library utilize it by typing “jsd”…

Read More Read More