• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nlohmann / json / 39584650968
95%

Build:
DEFAULT BRANCH: develop
Ran 21 Oct 2026 01:36PM UTC
Jobs 1
Files 59
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Oct 2026 10:26AM UTC coverage: 95.973% (-2.3%) from 98.273%
39584650968

push

github

web-flow
Copy the text of float tokens only when a SAX handler asks for it (#5852)

After the digits are converted while scanning, copying the token text into
token_buffer (an out-of-line std::string::append) was about 10% of parsing
canada.json. The only reader is the string argument of
json_sax::number_float(), and the library's own handlers
(json_sax_dom_parser, json_sax_dom_callback_parser, json_sax_acceptor)
ignore it.

For contiguous input, the fast path now keeps a pointer to the token in the
input, and get_string() copies it on first use. The parser passes an empty
string to the handlers marked by the new internal trait
sax_ignores_number_text instead of calling get_string(), so json::parse()
and json::accept() never copy float text. User handlers, and
JSON_DIAGNOSTIC_POSITIONS (which reads get_string().size()), still see the
exact text. Keys and strings, which never have pending text, use the
unchecked get_string_token(). Input read through a window into a stream
(std::istream, FILE*) copies the text right away, because the next read may
refill the window.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

15908 of 39867 branches covered (39.9%)

23 of 23 new or added lines in 2 files covered. (100.0%)

136 existing lines in 8 files now uncovered.

12678 of 13210 relevant lines covered (95.97%)

4942120.6 hits per line

Coverage Regressions

Lines Coverage ∆ File
49
96.91
-0.02% include/nlohmann/json.hpp
33
90.86
-3.23% include/nlohmann/detail/input/number_parse.hpp
33
97.53
-2.05% include/nlohmann/detail/output/binary_writer.hpp
9
98.14
0.01% include/nlohmann/detail/json_pointer.hpp
8
87.5
1.79% include/nlohmann/detail/value_t.hpp
2
97.92
-0.36% include/nlohmann/detail/output/output_adapters.hpp
1
99.65
0.0% include/nlohmann/detail/input/input_adapters.hpp
1
99.63
0.02% include/nlohmann/detail/input/lexer.hpp
Jobs
ID Job ID Ran Files Coverage
1 39584650968.1 21 Oct 2026 01:36PM UTC 59
95.97
GitHub Action Run
Source Files on build 39584650968
  • Tree
  • List 59
  • Changed 11
  • Source Changed 11
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #39584650968
  • 5e13f834 on github
  • Prev Build on develop (#39491664698)
  • Next Build on develop (#39661817597)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc