Surfaced while comparing JSONata4Java against the jsonata-js 2.2.1 test corpus during the Jackson 3 migration (#430 / PR #431). Pre-existing functional-compatibility gap vs the reference implementation (try.jsonata.org 2.2.1), not a migration regression.
$toMillis with a picture whose fractional-second component supplies more precision than milliseconds throws a raw java.time.DateTimeException instead of truncating to milliseconds like the reference.
Example:
$toMillis("2026-04-08T19:05:04.01987", "[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f1]")
- JSONata4Java: raw
java.time.DateTimeException: Invalid value for NanoOfSecond (valid values 0 - 999999999): ...
- jsonata.org 2.2.1: truncates sub-millisecond precision to milliseconds (round-trips to
...019Z).
Expected: truncate to millisecond precision (matching the reference) rather than leaking an internal java.time.DateTimeException.
Reference: jsonata-js 2.2.1.
Surfaced while comparing JSONata4Java against the jsonata-js 2.2.1 test corpus during the Jackson 3 migration (#430 / PR #431). Pre-existing functional-compatibility gap vs the reference implementation (try.jsonata.org 2.2.1), not a migration regression.
$toMilliswith a picture whose fractional-second component supplies more precision than milliseconds throws a rawjava.time.DateTimeExceptioninstead of truncating to milliseconds like the reference.Example:
java.time.DateTimeException: Invalid value for NanoOfSecond (valid values 0 - 999999999): ......019Z).Expected: truncate to millisecond precision (matching the reference) rather than leaking an internal
java.time.DateTimeException.Reference: jsonata-js 2.2.1.