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

TermsResult cannot parse from numeric or boolean JSON #88

Closed
MHova opened this issue Jan 20, 2016 · 2 comments
Closed

TermsResult cannot parse from numeric or boolean JSON #88

MHova opened this issue Jan 20, 2016 · 2 comments

Comments

@MHova
Copy link
Contributor

MHova commented Jan 20, 2016

Specifically because termKey is declared as type Text, non-String bucket terms like numbers and booleans will fail parsing.

We could either keep termKey as type Text and put some more smarts in parseJSON or introduce more data constructors (TextTermsResult, NumericTermsResult, etc) and also put some more smarts in parseJSON.

@bitemyapp
Copy link
Owner

@MHova I'd just as soon fix the type to be explicit about the possibility of Text, Bool, Number.

/cc @MichaelXavier

@MHova
Copy link
Contributor Author

MHova commented Jan 20, 2016

Thanks for the quick response. Let me take a stab at fixing this.

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