Ping @mpx. This looks good. Normally we cannot expect the initial portion of a string accepted by strtod can also be accepted by strtoll (Infinity, Inf, NaN, nan(222), etc). However, the form accepted by RFC 8259 is much narrower and this patch should work.
See #22 . The origin pr mix some other feature.