bunq / sdk_csharp

C# SDK for bunq API
MIT License
35 stars 22 forks source link

JsonSerializationException when logging in (ApiContext.Create) #135

Closed InhouseMedia closed 4 years ago

InhouseMedia commented 4 years ago

Steps to reproduce:

1. Log in with ApiContext.Create()

What should happen:

1. Make use of api

What happens:

1. JsonSerializationException

Newtonsoft.Json.JsonSerializationException: "Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Bunq.Sdk.Model.Generated.Object.LabelUser' because the type requires a JSON object (e.g. {\"name\":\"value\"}) to deserialize correctly.\nTo 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.\nPath '[2].UserCompany.director_alias', line 95, position 25."

Traceback

SDK version and environment

Response id

Extra info:

tbotting commented 4 years ago

Having the same for the Java SDK. It's been almost 24 hours now.

InhouseMedia commented 4 years ago

Have made a pull-request that solves the issue https://github.com/bunq/sdk_csharp/pull/136

loedeman commented 4 years ago

The same issue here (production), would be very nice if the PR got published asap ;)...

tbotting commented 4 years ago

Sorry for being harsh, but I believe as a bank, completely breaking your SDKs overnight and taking this much time to fix it is not acceptable.

mason-chase commented 4 years ago

I cannot believe Bunq make a change to API model without updating Document or SDK Nuget , This is a breaking change, when is the nuget going to be updated?

lexym commented 4 years ago

Hey, guys 👋We've resolved the issue. It must work now.

mason-chase commented 4 years ago

Are we back to original? Can you please clarify? I patched SDK manually to accept Array of DirectoAlias Object and today it stopped working again today!