JSON for Modern C++
This report summarizes scanner evidence for nlohmann/json, a C++ project with 50,827 GitHub stars. SynthScan examined 261,885 lines of code across 1172 source files, recording 837 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 2.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 809 finding(s).
Are imports declared and package/API names verified? 17 finding(s).
Are wrappers, guards, and repeated structures necessary? 13 finding(s).
Which changes need focused human review? 837 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 837 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CMakeLists.txt | 1 | cmake_minimum_required(VERSION 3.5...4.0) | COMMENT |
| LOW | README.md | 681 | json j_result = j_original.patch(j_patch); | COMMENT |
| LOW | README.md | 721 | // "a": "z", | COMMENT |
| LOW | tools/amalgamate/amalgamate.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | tools/astyle/requirements.txt | 1 | # astyle is deliberately pinned: newer versions reformat the code, and this version | COMMENT |
| LOW | cmake/clang_sanitizer_ignorelist.txt | 1 | # Sanitizer ignore list for ci_test_clang_sanitizer (-fsanitize-ignorelist). | COMMENT |
| LOW | include/nlohmann/ordered_map.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/ordered_map.hpp | 261 | // [ a, b, c, d, e, f, g, h, i, j ] | COMMENT |
| LOW | include/nlohmann/json.hpp | 21 | #include <algorithm> // all_of, find, for_each, none_of | COMMENT |
| LOW | include/nlohmann/json.hpp | 41 | #include <vector> // vector | COMMENT |
| LOW | include/nlohmann/json.hpp | 61 | #include <nlohmann/detail/input/input_adapters.hpp> | COMMENT |
| LOW | include/nlohmann/json.hpp | 81 | #include <nlohmann/detail/output/output_adapters.hpp> | COMMENT |
| LOW | include/nlohmann/json.hpp | 321 | // container types // | COMMENT |
| LOW | include/nlohmann/json.hpp | 421 | #endif | COMMENT |
| LOW | include/nlohmann/json.hpp | 441 | COMMENT | |
| LOW | include/nlohmann/json.hpp | 921 | COMMENT | |
| LOW | include/nlohmann/json.hpp | 941 | // array/object, which neither allocates nor recurses more | COMMENT |
| LOW | include/nlohmann/json.hpp | 2241 | /// detail::has_stable_elements), erasing a member may move the members | COMMENT |
| LOW | include/nlohmann/json.hpp | 2261 | COMMENT | |
| LOW | include/nlohmann/json.hpp | 5541 | JSON_IMPLEMENT_OPERATOR( <, false, false, operator<(lhs_type, rhs_type), | COMMENT |
| LOW | include/nlohmann/json.hpp | 5961 | /// @} | COMMENT |
| LOW | include/nlohmann/json.hpp | 6121 | COMMENT | |
| LOW | include/nlohmann/json.hpp | 6161 | // the deleted version is a function template after the class, because | COMMENT |
| LOW | include/nlohmann/json.hpp | 7681 | // ordered_json, also needs the common keys to be in the same order | COMMENT |
| LOW | include/nlohmann/json.hpp | 7741 | return true; | COMMENT |
| LOW | include/nlohmann/json.hpp | 7901 | // and every pair of elements is still diffed completely before the | COMMENT |
| LOW | include/nlohmann/json.hpp | 8481 | COMMENT | |
| LOW | include/nlohmann/adl_serializer.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/json_literals.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/json_literals.hpp | 21 | // amalgamation inlines macro_scope.hpp only once), so only standard and public | COMMENT |
| LOW | include/nlohmann/byte_container_with_subtype.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/json_view.hpp | 21 | * The source text must outlive a document that borrows it (lvalue byte * | COMMENT |
| LOW | include/nlohmann/json_view.hpp | 41 | #endif | COMMENT |
| LOW | include/nlohmann/json_view.hpp | 61 | // IWYU pragma: no_include "nlohmann/detail/meta/type_traits.hpp" | COMMENT |
| LOW | include/nlohmann/json_view.hpp | 1221 | } | COMMENT |
| LOW | include/nlohmann/json_fwd.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/hash.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/string_escape.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/json_ref.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/value_t.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/string_concat.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/string_utils.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 1 | // __ _____ _____ _____ | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 21 | #if defined(__clang__) | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 41 | #elif (defined(__cplusplus) && __cplusplus > 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 61 | #if __has_include(<version>) | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 81 | #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 101 | #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 121 | COMMENT | |
| LOW | include/nlohmann/detail/macro_scope.hpp | 141 | #define JSON_HAS_RANGES 0 | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 161 | COMMENT | |
| LOW | include/nlohmann/detail/macro_scope.hpp | 181 | COMMENT | |
| LOW | include/nlohmann/detail/macro_scope.hpp | 201 | #else | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 221 | // GCC targeting MinGW and with every other toolchain the library is tested on. | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 241 | // override exception macros | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 261 | // allow overriding assert | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 441 | #define NLOHMANN_JSON_PASTE2(func, v1) func(v1) | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 461 | #define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19 | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 481 | #define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19 | COMMENT |
| LOW | include/nlohmann/detail/macro_scope.hpp | 561 | NLOHMANN_JSON_DOUBLE_PASTE7, \ | COMMENT |
| 721 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/serve_header/serve_header.py | 166 | CODE | |
| LOW | tools/serve_header/serve_header.py | 201 | CODE | |
| LOW | tools/serve_header/serve_header.py | 229 | CODE | |
| LOW | tools/check_build_options/check_build_options.py | 101 | CODE | |
| LOW | tools/amalgamate/amalgamate.py | 148 | CODE | |
| LOW | tools/amalgamate/amalgamate.py | 211 | CODE | |
| LOW | tools/gdb_pretty_printer/nlohmann-json.py | 16 | CODE | |
| LOW | tests/benchmarks/json_view/compare.py | 209 | CODE | |
| LOW | tests/benchmarks/json_view/compare.py | 236 | CODE | |
| LOW | tests/thirdparty/imapdl/filterbr.py | 8 | CODE | |
| LOW | tests/thirdparty/imapdl/filterbr.py | 37 | CODE | |
| LOW | tests/thirdparty/imapdl/filterbr.py | 84 | CODE | |
| LOW | docs/docset/generate_docset.py | 65 | CODE | |
| LOW | docs/docset/generate_docset.py | 412 | CODE | |
| LOW | docs/mkdocs/hooks/api_changes.py | 54 | CODE | |
| LOW | docs/mkdocs/hooks/api_changes.py | 107 | CODE | |
| LOW | docs/mkdocs/hooks/unreleased_versions.py | 45 | CODE | |
| LOW | docs/mkdocs/scripts/check_structure.py | 20 | CODE | |
| LOW | docs/mkdocs/scripts/check_structure.py | 219 | CODE | |
| LOW | docs/mkdocs/scripts/check_structure.py | 249 | CODE | |
| LOW | docs/mkdocs/scripts/check_structure.py | 278 | CODE | |
| LOW | docs/mkdocs/scripts/check_version_history.py | 72 | CODE | |
| LOW | docs/mkdocs/scripts/figures/exception_map.py | 53 | CODE | |
| LOW | docs/mkdocs/scripts/slideshow/build.py | 171 | CODE | |
| LOW | docs/mkdocs/scripts/slideshow/build.py | 345 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/benchmarks/json_view/compare.py | 96 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/benchmarks/json_view/compare.py | 98 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/benchmarks/json_view/compare.py | 205 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/benchmarks/json_view/compare.py | 207 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/benchmarks/json_view/compare.py | 232 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/benchmarks/json_view/compare.py | 234 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/src/unit-udt.cpp | 436 | optPerson.reset(new udt::person{{42}, {"John Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owni | CODE |
| LOW | tests/src/unit-udt.cpp | 445 | auto person = udt::person{{42}, {"John Doe"}, udt::country::russia}; | CODE |
| LOW | tests/src/unit-udt.cpp | 551 | optPerson.reset(new udt::person{{42}, {"John Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-m | CODE |
| LOW | tests/src/unit-udt.cpp | 560 | auto person = udt::person{{42}, {"John Doe"}, udt::country::russia}; | CODE |
| LOW | tests/src/unit-conversions2.cpp | 792 | std::optional<std::string> opt_get_to = "placeholder"; | CODE |
| LOW | …mann_define_type_intrusive_only_serialize_explicit.cpp | 12 | std::string name = "John Doe"; | CODE |
| LOW | …s/examples/nlohmann_define_type_intrusive_explicit.cpp | 12 | std::string name = "John Doe"; | CODE |
| LOW | …ohmann_define_type_intrusive_with_default_explicit.cpp | 12 | std::string name = "John Doe"; | CODE |
| LOW | …nn_define_type_non_intrusive_with_default_explicit.cpp | 11 | std::string name = "John Doe"; | CODE |
| LOW | …hmann_define_type_non_intrusive_with_default_macro.cpp | 11 | std::string name = "John Doe"; | CODE |
| LOW | …docs/examples/nlohmann_define_type_intrusive_macro.cpp | 12 | std::string name = "John Doe"; | CODE |
| LOW | …lohmann_define_type_intrusive_only_serialize_macro.cpp | 12 | std::string name = "John Doe"; | CODE |
| LOW | …/nlohmann_define_type_intrusive_with_default_macro.cpp | 12 | std::string name = "John Doe"; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/benchmarks/json_view/compare.py | 217 | except OSError: | CODE |
| HIGH | docs/mkdocs/hooks/copy_markdown_source.py | 47 | except (SnippetMissingError, OSError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | .github/workflows/comment_check_amalgamation.yml | 85 | const opts = github.rest.issues.listForRepo.endpoint.merge({ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/serve_header/serve_header.py | 426 | except Exception: | CODE |
| LOW | tools/gdb_pretty_printer/nlohmann-json.py | 32 | except Exception: | CODE |
| LOW | docs/docset/generate_docset.py | 375 | except Exception as e: # noqa: BLE001 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/amalgamate/amalgamate.py | 32 | CODE | |
| LOW | tools/amalgamate/amalgamate.py | 33 | CODE | |
| LOW | tools/amalgamate/amalgamate.py | 34 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/serve_header/serve_header.py | 255 | class HeaderRequestHandler(SimpleHTTPRequestHandler): | CODE |
| LOW | tools/check_build_options/check_build_options.py | 63 | def cmake_pkgconfig_definitions(cmake): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/mkdocs/scripts/mermaid/package-lock.json | 1402 | "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", | CODE |