mirror of
https://github.com/nlohmann/json.git
synced 2026-11-04 11:49:22 +00:00
docs: new design for the documentation site (#5934)
* docs: new design for the documentation site Apply the brand to the Material for MkDocs site: Inter and JetBrains Mono served by the site (upright and real italic), brand colours, blue header band with the syntax pattern, wordmark in the header, new home page (hero, cards, animated feature tour), 404 page, polish for tabs, search, footer, focus rings, tables and code blocks, and theme features (code copy, previous/next footer, TOC follow, search suggestions). Draw the number railroad diagram, the parser callback events and the iterator illustrations as inline SVGs that follow the light and dark scheme. The generator scripts are in docs/mkdocs/scripts/figures; the feature slideshow (json-light.svg, json-dark.svg, replacing json.gif on the home page) is built by docs/mkdocs/scripts/slideshow. Decision nodes in five flowcharts become hexagons, which need far less room. Signed-off-by: Niels Lohmann <mail@nlohmann.me> * 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> * docs: macro chooser generates adl_serializer for non-default-constructible types Signed-off-by: Niels Lohmann <mail@nlohmann.me> * docs: cross-link concept pages and API pages in See also sections Add See also links in both directions between the concept pages (features, home, integration) and the API pages, write API links in code font, give every entry a comment after a dash, and show the callback event figure on the parser callbacks page. Signed-off-by: Niels Lohmann <mail@nlohmann.me> * docs: address review comments on the new design - Home: add a "Latest release" button - Sponsors: update the list and group it by tier - Features: list all feature pages on the index page - Releases: add highlights per release, link the 4.0 roadmap, add the first commit to the timeline - Exceptions: prefix all example messages with the exception name - API: no code font for format names in the See also links of the to_/from_ pages - Merge Patch: show the document before, the patch, and the result - Replace "--" with typographic dashes, mark external links with an icon, center Mermaid diagrams Signed-off-by: Niels Lohmann <mail@nlohmann.me> --------- Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
2bb2feeef4
commit
a47170346a
417 files changed
+11100
-3041
No files matched your search
@@ -338,3 +338,12 @@ The library maps BJData types to JSON value types as follows:
|
||||
```json
|
||||
--8<-- "examples/from_bjdata.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Binary formats](index.md) - overview and comparison of the supported binary formats
|
||||
- [Binary values](../binary_values.md) - how binary values and subtypes map to BJData
|
||||
- [`to_bjdata`](../../api/basic_json/to_bjdata.md) - serialize a JSON value to BJData
|
||||
- [`from_bjdata`](../../api/basic_json/from_bjdata.md) - parse a JSON value from BJData
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
@@ -201,3 +201,12 @@ of the message are reported as [parse_error.110](../../home/exceptions.md#jsonex
|
||||
```json
|
||||
--8<-- "examples/from_bon8.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Binary formats](index.md) - overview and comparison of the supported binary formats
|
||||
- [Binary values](../binary_values.md) - how binary values and subtypes map to BON8
|
||||
- [`to_bon8`](../../api/basic_json/to_bon8.md) - serialize a JSON value to BON8
|
||||
- [`from_bon8`](../../api/basic_json/from_bon8.md) - parse a JSON value from BON8
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
@@ -204,3 +204,12 @@ The library maps BSON record types to JSON value types as follows:
|
||||
```json
|
||||
--8<-- "examples/from_bson.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Binary formats](index.md) - overview and comparison of the supported binary formats
|
||||
- [Binary values](../binary_values.md) - how binary values and subtypes map to BSON
|
||||
- [`to_bson`](../../api/basic_json/to_bson.md) - serialize a JSON value to BSON
|
||||
- [`from_bson`](../../api/basic_json/from_bson.md) - parse a JSON value from BSON
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
@@ -287,3 +287,13 @@ string of the same major type, as required by [RFC 8949, Section 3.2.3](https://
|
||||
```json
|
||||
--8<-- "examples/from_cbor.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Binary formats](index.md) - overview and comparison of the supported binary formats
|
||||
- [Binary values](../binary_values.md) - how binary values and subtypes map to CBOR
|
||||
- [`to_cbor`](../../api/basic_json/to_cbor.md) - serialize a JSON value to CBOR
|
||||
- [`from_cbor`](../../api/basic_json/from_cbor.md) - parse a JSON value from CBOR
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
- [`cbor_tag_handler_t`](../../api/basic_json/cbor_tag_handler_t.md) - how CBOR tags are handled when parsing
|
||||
@@ -53,11 +53,32 @@ See [binary values](../binary_values.md) for more information.
|
||||
| UBJSON (size) | 58.6 % | 92.3 % | 86.8 % | 97.4 % |
|
||||
| UBJSON (size+type) | 55.9 % | 92.3 % | 85.0 % | 95.0 % |
|
||||
|
||||
Sizes compared to minified JSON value; the smallest size per file is printed in bold.
|
||||
<p class="nj-table-caption" markdown>Size of each test file in each format, in percent of the minified JSON value; the smallest size per file is printed in bold. The (size) and (size+type) rows are written with the `use_size` and `use_type` options of [`to_bjdata`](../../api/basic_json/to_bjdata.md) and [`to_ubjson`](../../api/basic_json/to_ubjson.md).</p>
|
||||
|
||||
<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_twitter.svg"
|
||||
</div>
|
||||
<div class="nj-fig-wrap" markdown>
|
||||
--8<-- "images/binary_sizes_citm_catalog.svg"
|
||||
</div>
|
||||
<div class="nj-fig-wrap" markdown>
|
||||
--8<-- "images/binary_sizes_jeopardy.svg"
|
||||
</div>
|
||||
</div>
|
||||
<p class="nj-charts-caption" markdown>The table above as charts: size per base format relative to minified JSON (vertical line at
|
||||
100 %); the smallest format per file is drawn in a stronger colour than the others. The size and size+type variants of BJData and UBJSON are
|
||||
omitted here; see the table.</p>
|
||||
|
||||
## See also
|
||||
|
||||
- [`cbor_tag_handler_t`](../../api/basic_json/cbor_tag_handler_t.md) - how CBOR tags are handled when parsing
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [Binary values](../binary_values.md) - binary values and subtypes
|
||||
- [**to_cbor**](../../api/basic_json/to_cbor.md) / [**from_cbor**](../../api/basic_json/from_cbor.md), [**to_msgpack**](../../api/basic_json/to_msgpack.md) / [**from_msgpack**](../../api/basic_json/from_msgpack.md), [**to_bson**](../../api/basic_json/to_bson.md) / [**from_bson**](../../api/basic_json/from_bson.md), [**to_ubjson**](../../api/basic_json/to_ubjson.md) / [**from_ubjson**](../../api/basic_json/from_ubjson.md), [**to_bjdata**](../../api/basic_json/to_bjdata.md) / [**from_bjdata**](../../api/basic_json/from_bjdata.md), [**to_bon8**](../../api/basic_json/to_bon8.md) / [**from_bon8**](../../api/basic_json/from_bon8.md) - the conversion functions
|
||||
- [Parsing untrusted input](../parsing/untrusted_input.md)
|
||||
- [`to_cbor`](../../api/basic_json/to_cbor.md) - / [`from_cbor`](../../api/basic_json/from_cbor.md), [`to_msgpack`](../../api/basic_json/to_msgpack.md) / [`from_msgpack`](../../api/basic_json/from_msgpack.md), [`to_bson`](../../api/basic_json/to_bson.md) / [`from_bson`](../../api/basic_json/from_bson.md), [`to_ubjson`](../../api/basic_json/to_ubjson.md) / [`from_ubjson`](../../api/basic_json/from_ubjson.md), [`to_bjdata`](../../api/basic_json/to_bjdata.md) / [`from_bjdata`](../../api/basic_json/from_bjdata.md), [`to_bon8`](../../api/basic_json/to_bon8.md) / [`from_bon8`](../../api/basic_json/from_bon8.md) - the conversion functions
|
||||
- [Parsing untrusted input](../parsing/untrusted_input.md) - harden an application that parses untrusted binary data
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
|
||||
@@ -242,3 +242,12 @@ written as the reserved negative ext types (255 as -1), so `json::binary({1,2,3,
|
||||
```json
|
||||
--8<-- "examples/from_msgpack.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Binary formats](index.md) - overview and comparison of the supported binary formats
|
||||
- [Binary values](../binary_values.md) - how binary values and subtypes map to MessagePack
|
||||
- [`to_msgpack`](../../api/basic_json/to_msgpack.md) - serialize a JSON value to MessagePack
|
||||
- [`from_msgpack`](../../api/basic_json/from_msgpack.md) - parse a JSON value from MessagePack
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
@@ -221,3 +221,12 @@ The library maps UBJSON types to JSON value types as follows:
|
||||
```json
|
||||
--8<-- "examples/from_ubjson.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Binary formats](index.md) - overview and comparison of the supported binary formats
|
||||
- [Binary values](../binary_values.md) - how binary values and subtypes map to UBJSON
|
||||
- [`to_ubjson`](../../api/basic_json/to_ubjson.md) - serialize a JSON value to UBJSON
|
||||
- [`from_ubjson`](../../api/basic_json/from_ubjson.md) - parse a JSON value from UBJSON
|
||||
- [`JSON_STRICT_BINARY_UTF8`](../../api/macros/json_strict_binary_utf8.md) - reject ill-formed UTF-8 in strings
|
||||
- [SAX interface](../parsing/sax_interface.md) - decode binary formats without building a value
|
||||
Reference in new issue
Block a user