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

Failing to parse encoded array as top level structure #24

Open
serjek opened this issue Jun 11, 2022 · 1 comment
Open

Failing to parse encoded array as top level structure #24

serjek opened this issue Jun 11, 2022 · 1 comment

Comments

@serjek
Copy link

serjek commented Jun 11, 2022

tink.QueryString.parse(("[0]=1":Array<Int>))

result:
code: 422, message: ' (encoded as ) is not a valid integer'

@serjek serjek changed the title Failing to parse encoded array as top level structure Failing to parse encoded array of objects as top level structure Jun 11, 2022
@serjek serjek changed the title Failing to parse encoded array of objects as top level structure Failing to parse encoded array as top level structure Jun 12, 2022
@back2dos
Copy link
Member

Never ran into this yet, because it's not such a terribly good idea to have an array at the very root. If it's an object, it's trivial to extend the structure by adding an (optional) field and thus not breaking anything, while if it's an array you have to start restructuring things. So I'm inclined to say that we probably shouldn't support this and issue a proper error message at compile time.

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

No branches or pull requests

2 participants