You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm fairly new to C# so please be gentle with me ;) I am creating an UWP app. I run into an exception in SessionServerConverter:29:
var jObjects = JArray.Load(reader).ToObject<List<JObject>>();
My code (IP masked):
IList<string> permittedIps = new List<string>();
permittedIps.Add("x.x.x.x");
var apiContext = ApiContext.Create(ApiEnvironmentType.SANDBOX, API_KEY, DEVICE_DESCRIPTION, permittedIps);
apiContext.Save("Config/bunq.conf");
Stacktrace:
HResult=0x80070057
Message=Arg_WrongType, [], Newtonsoft.Json.Linq.JObject
Source=<unknown>
StackTrace:
at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item) in f:\dd\ndp\fxcore\src\System.Collections\System\Collections\Generic\List.cs:line 254
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(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.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Bunq.Sdk.Json.SessionServerConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in C:\Users\BabyDino\Documents\GitHub\sdk_csharp\BunqSdk\Json\SessionServerConverter.cs:line 29
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
bunq responses are OK (checked with profiler). The device will register without issue. Tried earlier versions of Newtonsoft.JSON as well. Seems to be a casting issue?
The text was updated successfully, but these errors were encountered:
I'm fairly new to C# so please be gentle with me ;) I am creating an UWP app. I run into an exception in SessionServerConverter:29:
var jObjects = JArray.Load(reader).ToObject<List<JObject>>();
My code (IP masked):
Stacktrace:
bunq responses are OK (checked with profiler). The device will register without issue. Tried earlier versions of Newtonsoft.JSON as well. Seems to be a casting issue?
The text was updated successfully, but these errors were encountered: