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

json-server casts int-like strings to int #4

Open
buhman opened this issue Oct 25, 2017 · 0 comments
Open

json-server casts int-like strings to int #4

buhman opened this issue Oct 25, 2017 · 0 comments

Comments

@buhman
Copy link

buhman commented Oct 25, 2017

If you create a todo like this:

POST /todos

{
  "title": "1234",
  
}

The response will be:

{
  "title": 1234,
  
}

This breaks the todoDecoder, which expects title to be a string. Even more confusingly, the Result.Err from FetchAllDone and CreateDone are discarded as well. Maybe consider reporting upstream and/or making a more type-friendly API.

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

1 participant