mirror of
https://github.com/nlohmann/json.git
synced 2026-11-17 09:01:28 +00:00
For a high-precision number that is a floating-point number, the UBJSON/BJData reader passed lexer::get_token_string() as the source text to SAX number_float(). That helper is meant for error messages and shows a token of more than 8192 characters only by its first and last 4096 characters around "...", so a SAX handler received a shortened string for a long number. Pass the number text the lexer collected while scanning the number (lexer::get_string()) instead. It is complete and, as before, holds only the number, without any whitespace or byte order mark around it in the payload. Error messages still use get_token_string(). Signed-off-by: Niels Lohmann <mail@nlohmann.me>