Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoder doesn't check given value type if server responses with empty type tag. #19

Open
kolo opened this issue Apr 14, 2014 · 1 comment
Labels

Comments

@kolo
Copy link
Owner

kolo commented Apr 14, 2014

In situation when server responses with empty type tag () decoder simply passes it without actually checking if value type in response matches value type of variable passed by user to decoder.

@kolo kolo added the bug label Apr 14, 2014
@oz
Copy link

oz commented Jun 22, 2014

Do you have an idea on how to fix this? 🎱

I actually met the case while playing with opensubtitles.org's API. Some of their API methods can return either arrays of <struct>, or plain <struct> replies : which mean some calls to the same function can be decoded in two different ways: this does not play very well with Go's type system I'm afraid. 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants