-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I am calling: SmallBalance result = apiInstance.listSmallBalance();
I get this Exception: IllegalStateException
Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:520)
at com.google.gson.Gson.fromJson(Gson.java:1361)
at com.google.gson.Gson.fromJson(Gson.java:1262)
at com.google.gson.Gson.fromJson(Gson.java:1171)
at com.google.gson.Gson.fromJson(Gson.java:1137)
at io.gate.gateapi.JSON.deserialize(JSON.java:142)
at io.gate.gateapi.ApiClient.deserialize(ApiClient.java:781)
at io.gate.gateapi.ApiClient.handleResponse(ApiClient.java:984)
at io.gate.gateapi.ApiClient.execute(ApiClient.java:911)
at io.gate.gateapi.api.WalletApi.listSmallBalanceWithHttpInfo(WalletApi.java:2513)
at io.gate.gateapi.api.WalletApi.listSmallBalance(WalletApi.java:2495)
The deserialize method expects an object, but the json body passed from io.gate.gateapi.ApiClient.deserialize is an array hence the exception:
This is the body that throws the exception:
[{"currency":"BICITY","available_balance":"4.50000000","convertible_to_gt":"0.001038","estimated_as_btc":"0.00000014"}]
I use gate-api version 6.78.0 and gson-2.11.0 (both latest version)
Metadata
Metadata
Assignees
Labels
No labels