You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
roundtrip27.json is [1.7976931348623157e308], but I feel [1.7976931348623157e+308] should be equally correct output as JSON allows (but does not mandate) a positive exponent sign.
The text was updated successfully, but these errors were encountered:
Yes. Roundtirp tests are not required by JSON standard.
For example, 1 can be stringified as +1, 1.0, 1.00, 1e0, 1e-0, 1e+0, etc.
But often JSON generators will produce shortest output which can be sufficiently restored to the original data.
Brevity makes sense, but some other roundtrip tests are not briefest possible, like [0.0] (roundtrip20.json) which shortest form is [0]. So I guess the goal of these test are then "shortest form that restores data and type (int vs float)". That's fine, I just wanted to wrap my head around the rationale =)
roundtrip27.json
is[1.7976931348623157e308]
, but I feel[1.7976931348623157e+308]
should be equally correct output as JSON allows (but does not mandate) a positive exponent sign.The text was updated successfully, but these errors were encountered: