System.Runtime.Serialization.SerializationException
HResult=0x8013150C
Message=There was an error deserializing the object of type SendCloudApi.Net.Models.Integration[]. String '2021-03-08T11:00:24.277796+01:00' was not recognized as a valid DateTime.
Source=System.Private.DataContractSerialization
StackTrace:
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(XmlDictionaryReader reader)
at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(Stream stream)
at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream)
at SendCloudApi.Net.Helpers.JsonHelper.Deserialize[T](String json, String dateTimeFormat)
at SendCloudApi.Net.SendCloudApi.d251.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at SendCloudApi.Net.SendCloudApi.d221.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at SendCloudApi.Net.Resources.SendCloudApiAbstractResource.d141.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at SendCloudApi.Net.Resources.SendCloudApiIntegrationsResource.d1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
Inner Exception 1:
FormatException: String '2021-03-08T11:00:24.277796+01:00' was not recognized as a valid DateTime.
I think the issue is that you use DateTime instead of DateTimeOffset everywhere
After last fix there is a new issue:
System.Runtime.Serialization.SerializationException HResult=0x8013150C Message=There was an error deserializing the object of type SendCloudApi.Net.Models.Integration[]. String '2021-03-08T11:00:24.277796+01:00' was not recognized as a valid DateTime. Source=System.Private.DataContractSerialization StackTrace: at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(XmlDictionaryReader reader) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(Stream stream) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream) at SendCloudApi.Net.Helpers.JsonHelper.Deserialize[T](String json, String dateTimeFormat) at SendCloudApi.Net.SendCloudApi.d25d 22d14d 1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
1.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at SendCloudApi.Net.SendCloudApi.1.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at SendCloudApi.Net.Resources.SendCloudApiAbstractResource.1.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at SendCloudApi.Net.Resources.SendCloudApiIntegrationsResource.Inner Exception 1: FormatException: String '2021-03-08T11:00:24.277796+01:00' was not recognized as a valid DateTime.
I think the issue is that you use DateTime instead of DateTimeOffset everywhere