Мы используем пакеты DeveloperForce.Force 1.3.2
и Newtsoft 10.0.2
для извлечения деталей из Salesforce
.Исключение выдается при вызове метода DescribeAsync
для объекта ForceClient
.
Мы попытались обновить DeveloperForce.Force
nuget с 1.3.2
до 2.0.7
и Newtsoft
с 10.0.2
до 11.0.2
, но проблема не решена.
using (var client = await SalesforceService.GetUserNamePasswordForceClientAsync())
{
JObject jsonString = await client.DescribeAsync<JObject>(obj);
}
Сообщение об ошибке -
Cannot create and populate list type Newtonsoft.Json.Linq.JToken
StackTrace -
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Salesforce.Common.ServiceHttpClient.<HttpGetAsync>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()