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

PUT requests: Boolean values(true, false) getting converted to 1, 0 #25

Closed
vijeysrc opened this issue Sep 17, 2014 · 3 comments
Closed

Comments

@vijeysrc
Copy link

The boolean values, in a PUT request data load, gets stored as 0 or 1 (for false and true respectively). On research, I found in routes.js, there is a call to toNative method from utils module. The toNative method converts boolean literal values to integer numbers like 0 or 1.

I think the toNative method should convert only the string values to its native equivalent.

Please advise.

@typicode
Copy link
Owner

Thanks a lot for the heads up. I've fixed it and will release a new version this week.
I'll keep you informed :)

manuquentin pushed a commit to manuquentin/json-server that referenced this issue Sep 18, 2014
@typicode
Copy link
Owner

Just released v0.4.0 which contains the fix.

@vijeysrc
Copy link
Author

Thank you

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