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

nlohmann / json / 37955575120
99%

Build:
DEFAULT BRANCH: develop
Ran 09 Oct 2026 05:12PM UTC
Jobs 1
Files 37
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

09 Oct 2026 03:57PM UTC coverage: 98.589% (+0.06%) from 98.527%
37955575120

push

github

web-flow
Unflatten in time and memory linear in the pointer depth (#5793)

* Unflatten in time and memory linear in the pointer depth

#5443 made unflatten() decide between arrays and objects independently
of the iteration order by collecting the pointer prefixes that have a
reference token 0 below them in a std::set<std::vector<string_t>>.
Every such prefix was stored as a copy of all its reference tokens, and
get_and_create() compared whole prefix vectors at every step, so
unflattening a pointer of depth d took time and memory quadratic in d:
a 10,000-level array pointer took 18 s and 1.3 GB, a 100,000-level one
did not finish.

The prefixes are now numbered nodes of a tree, so each is stored once
and get_and_create() follows the tree token by token. The result is
unchanged, including its independence of the iteration order.

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

* Initialize prefix_tree members to satisfy -Weffc++

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

* Move prefix_tree setup and child insertion into member functions

The constructor now creates the root node, add_child() inserts a
reference token below a prefix and returns the child's number, and
find_child() looks one up for get_and_create().

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

---------

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

3042 of 3240 branches covered (93.89%)

26 of 26 new or added lines in 1 file covered. (100.0%)

6 existing lines in 2 files now uncovered.

8805 of 8931 relevant lines covered (98.59%)

7300858.48 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
99.56
0.0% include/nlohmann/detail/output/binary_writer.hpp
1
99.71
0.04% include/nlohmann/detail/json_pointer.hpp
Jobs
ID Job ID Ran Files Coverage
1 37955575120.1 09 Oct 2026 05:12PM UTC 37
98.59
GitHub Action Run
Source Files on build 37955575120
  • Tree
  • List 37
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37955575120
  • 2913e964 on github
  • Prev Build on develop (#37923290768)
  • Next Build on develop (#37997235737)
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