VkLibrary icon indicating copy to clipboard operation
VkLibrary copied to clipboard

JsonReaderException

Open SergeiSheremet opened this issue 7 years ago • 2 comments

An exception occures when I try to send message to several people using userIds parameter.
image
I suppose it could be related to this:
https://vk.com/dev/first_guide?f=1.%20%D0%9C%D0%B5%D1%82%D0%BE%D0%B4%D1%8B%20%D0%B8%20%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B
image

SergeiSheremet avatar Dec 22 '18 22:12 SergeiSheremet

Good day and thank you for reporting this! A minimal repro would be highly appreciated. Or, feel free to submit a PR if you know how to fix the issue, then I immediately merge and push an update to NuGet. I think if VK API return type depends on arguments supplied, we can make two overloads for this method - one accepting a single user id, and another accepting a list of ids.

worldbeater avatar Dec 23 '18 07:12 worldbeater

We still don't support this. I don't wanna write overloads coz we will rewrite it after each code regeneration.

In scheme we have

"responses": {
  "response": {
    "$ref": "responses.json#/definitions/messages_send_response"
  },
  "userIdsResponse": {
    "$ref": "responses.json#/definitions/messages_send_user_ids_response"
  }
},

But actually, we got oneOf {messages_send_response, messages_send_user_ids_response} And we need to parse it as...? idk.

FrediKats avatar Feb 14 '20 10:02 FrediKats