Fixed json serialization of datetime-based objects