Esempio n. 1
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            var dataString = reader.Value.ToString();
            var date       = DateTimeSerializeHelper.DeserializeDateTime(dataString);

            return(date);
        }
Esempio n. 2
0
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            var date = ( DateTime? )value;

            writer.WriteValue(DateTimeSerializeHelper.SerializeDateTime(date));
        }