Sycade / BunqApi

.NET bunq API client by Sycade
3 stars 3 forks source link

Deserialization error upon creating DeviceServer #1

Closed bluewalk closed 7 years ago

bluewalk commented 7 years ago

Hi there (hoi!),

I am trying to use your API client to retrieve just my transactions from bunq, just to test everything quickly.

At the following code I'm getting a serialization error:

var deviceServer = await bunq.DeviceServers.CreateAsync("Bluewalk test", apiKey, installation.Token);

Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Sycade.BunqApi.Model.Error' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.

To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.

Update 09:17 The error that I'm receiving isn't parsed correctly:

parsedObject["Error"] {[ { "error_description": "User credentials are incorrect. Incorrect API key or IP address.", "error_description_translated": "User credentials are incorrect. Incorrect API key or IP address." } ]}

bluewalk commented 7 years ago

API Errors daargelaten (van het juiste ip adres het request sturen) zijn er andere deserialization errors bij GetEntities

System.ArgumentException: 'Requested value 'USE_RESPONSE_NATIVE_COMMENT' was not found.'

bluewalk commented 7 years ago

Ok, geen reactie... We laten dit project maar vallen

mlowijs commented 7 years ago

Hi Délano,

Sorry voor het gebrek aan reactie.

Omdat bunq zelf SDKs uitgegeven heeft voor o.a. .NET, heeft het voor mij weinig zin om hieraan verder te werken.

Michiel

On 6 Aug 2017, at 11:55, Délano notifications@github.com wrote:

Ok, geen reactie... We laten dit project maar vallen

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bluewalk commented 7 years ago

Precies, mede ook om die reden gesloten :)