Title: Json Deserializer throws exception because of wrong type · Issue #27 · gateio/gateapi-java · GitHub
Open Graph Title: Json Deserializer throws exception because of wrong type · Issue #27 · gateio/gateapi-java
X Title: Json Deserializer throws exception because of wrong type · Issue #27 · gateio/gateapi-java
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 wa...
Open Graph Description: I am calling: SmallBalance result = apiInstance.listSmallBalance(); I get this Exception: IllegalStateException Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStat...
X Description: I am calling: SmallBalance result = apiInstance.listSmallBalance(); I get this Exception: IllegalStateException Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.I...
Opengraph URL: https://github.com/gateio/gateapi-java/issues/27
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Json Deserializer throws exception because of wrong type","articleBody":"I am calling: `SmallBalance result = apiInstance.listSmallBalance();`\r\nI get this Exception: IllegalStateException\r\n\r\n```\r\nException in thread \"main\" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $\r\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure\r\n\tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:520)\r\n\tat com.google.gson.Gson.fromJson(Gson.java:1361)\r\n\tat com.google.gson.Gson.fromJson(Gson.java:1262)\r\n\tat com.google.gson.Gson.fromJson(Gson.java:1171)\r\n\tat com.google.gson.Gson.fromJson(Gson.java:1137)\r\n\tat io.gate.gateapi.JSON.deserialize(JSON.java:142)\r\n\tat io.gate.gateapi.ApiClient.deserialize(ApiClient.java:781)\r\n\tat io.gate.gateapi.ApiClient.handleResponse(ApiClient.java:984)\r\n\tat io.gate.gateapi.ApiClient.execute(ApiClient.java:911)\r\n\tat io.gate.gateapi.api.WalletApi.listSmallBalanceWithHttpInfo(WalletApi.java:2513)\r\n\tat io.gate.gateapi.api.WalletApi.listSmallBalance(WalletApi.java:2495)\r\n```\r\nThe deserialize method expects an object, but the json body passed from io.gate.gateapi.ApiClient.deserialize is an array hence the exception:\r\n\r\nThis is the body that throws the exception:\r\n`[{\"currency\":\"BICITY\",\"available_balance\":\"4.50000000\",\"convertible_to_gt\":\"0.001038\",\"estimated_as_btc\":\"0.00000014\"}]`\r\n\r\nI use gate-api version 6.78.0 and gson-2.11.0 (both latest version)","author":{"url":"https://github.com/Mykke24","@type":"Person","name":"Mykke24"},"datePublished":"2024-10-16T21:51:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/27/gateapi-java/issues/27"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:12525a57-7198-5a62-bf2d-a05decc7cb23 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9432:100547:156734:1B2364:6990221A |
| html-safe-nonce | 30b2008980e8c3764cae5136ccf9be10c4bd8bcb6f09dc508914aa15d6a10a2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDMyOjEwMDU0NzoxNTY3MzQ6MUIyMzY0OjY5OTAyMjFBIiwidmlzaXRvcl9pZCI6IjE1NjgzODc2ODQ2ODMwNDQxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6183c8bfb41d2f5831181365e9aac4d2748a0eb7a2709fb4d49115b45f50a5f6 |
| hovercard-subject-tag | issue:2593132905 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gateio/gateapi-java/27/issue_layout |
| twitter:image | https://opengraph.githubassets.com/98db9bd8f46e93eb76f722ecf17e11d749230e5b9035974ad56baa4303404461/gateio/gateapi-java/issues/27 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/98db9bd8f46e93eb76f722ecf17e11d749230e5b9035974ad56baa4303404461/gateio/gateapi-java/issues/27 |
| og:image:alt | I am calling: SmallBalance result = apiInstance.listSmallBalance(); I get this Exception: IllegalStateException Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Mykke24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/gateio/gateapi-java git https://github.com/gateio/gateapi-java.git |
| octolytics-dimension-user_id | 32661171 |
| octolytics-dimension-user_login | gateio |
| octolytics-dimension-repository_id | 163492710 |
| octolytics-dimension-repository_nwo | gateio/gateapi-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 163492710 |
| octolytics-dimension-repository_network_root_nwo | gateio/gateapi-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width