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.
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 becomes123450000ns).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.