docs: add figures, table captions and a macro chooser
- Figures with numbered captions: SAX stepper, json_view layout and edit stepper, exception map, JSON pointer and patch walkers, QA pipeline, scaling and binary size charts, roadmap lanes, release timeline, integration decision tree and namespace builder - Table captions (nj-table-caption) on 9 pages - Compile times: modules and PCH charts, filesystem section, re-measured Figure 1, links between features/modules.md and compile_times.md - Interactive macro chooser for features/arbitrary_types.md - Link check: exclude URLs that answer the plugin with 400/401/419 or are dead (customers.md) Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
96 files changed
+6737
-69
No files matched your search
@@ -96,6 +96,17 @@ comparison for text-heavy documents (63.5%-87.5%), at the cost of an
|
||||
whether it is worth the loss of human readability at all -- depends on the actual data; see the
|
||||
[comparison tables](binary_formats/index.md#comparison) before choosing one.
|
||||
|
||||
<div class="nj-charts-grid-wrap" markdown>
|
||||
<div class="nj-fig-wrap" markdown>
|
||||
--8<-- "images/binary_sizes_canada.svg"
|
||||
</div>
|
||||
<div class="nj-fig-wrap" markdown>
|
||||
--8<-- "images/binary_sizes_jeopardy.svg"
|
||||
</div>
|
||||
</div>
|
||||
<p class="nj-charts-caption" markdown>Two of the four panels from the [size comparison](binary_formats/index.md#sizes);
|
||||
the smallest format per file is drawn in a stronger colour than the others.</p>
|
||||
|
||||
## Object type: `json` vs. `ordered_json`
|
||||
|
||||
The default [`json`](../api/json.md) type stores object keys in a `#!cpp std::map`, giving logarithmic-time lookup,
|
||||
@@ -108,6 +119,13 @@ read. The [measurements on the `ordered_map` page](../api/ordered_map.md#complex
|
||||
negligible at typical object sizes (2000 keys: 0.7 ms for `json` vs. 3.6 ms for `ordered_json`, a 5x factor) but grows
|
||||
steeply for large, machine-generated objects (16 000 keys: 3.3 ms vs. 181.6 ms, a 54x factor).
|
||||
|
||||
<div class="nj-fig-wrap" markdown>
|
||||
--8<-- "images/ordered_json_scaling.svg"
|
||||
</div>
|
||||
<p class="nj-charts-caption" markdown>Parsing a flat object of `n` keys, measured with `-O2 -DNDEBUG`; all
|
||||
four sizes from the [table on the `ordered_map` page](../api/ordered_map.md#complexity), both
|
||||
axes logarithmic.</p>
|
||||
|
||||
If insertion order matters *and* an object routinely has many thousands of keys, `ordered_json`'s quadratic build cost
|
||||
may not be acceptable. The library's [`ObjectType` template parameter](types/template_parameters.md#objecttype) can be
|
||||
set to a different container instead: `#!cpp nlohmann::fifo_map` keeps insertion order with a real lookup index
|
||||
|
||||
Reference in new issue
Block a user