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

Reads errors on decimal durations #556

Open
nrktkt opened this issue Jan 9, 2021 · 0 comments
Open

Reads errors on decimal durations #556

nrktkt opened this issue Jan 9, 2021 · 0 comments

Comments

@nrktkt
Copy link

nrktkt commented Jan 9, 2021

Currently parsing a duration doesn't support decimal numbers. This might be improved by a) rounding the input to the nearest whole number or b) dynamically changing the temporal unit based on presence of a decimal (ie. 123.45ms becomes 123450000ns).

Happy to open a PR if a or b are agreeable behaviors.

Play JSON Version 2.8.1

API Scala

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

parsing a decimal JSON number into a Duration succeeds

Actual Behavior

parsing a decimal JSON number returns an error stating that a long is expected.

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