Repository Analysis

nlohmann/json

JSON for Modern C++

3.0 Likely human-written View on GitHub
3.0
Adjusted Score
3.0
Raw Score
100%
Time Factor
2026-05-26
Last Push
49,825
Stars
C++
Language
181,716
Lines of Code
844
Files
719
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 0LOW 718

Pattern Findings

719 matches across 7 categories. Click a row to expand file-level details.

Over-Commented Block691 hits · 511 pts
SeverityFileLineSnippet
LOWCMakeLists.txt1cmake_minimum_required(VERSION 3.5...4.0)
LOWREADME.md681// {
LOWtools/amalgamate/amalgamate.py1#!/usr/bin/env python3
LOWinclude/nlohmann/ordered_map.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/ordered_map.hpp241
LOWinclude/nlohmann/json.hpp21// Workaround for GCC template redefinition errors in C++ modules
LOWinclude/nlohmann/json.hpp41#include <utility> // declval, forward, move, pair, swap
LOWinclude/nlohmann/json.hpp61#include <nlohmann/detail/json_ref.hpp>
LOWinclude/nlohmann/json.hpp181 /// how to treat decoding errors
LOWinclude/nlohmann/json.hpp321 return result;
LOWinclude/nlohmann/json.hpp801#endif
LOWinclude/nlohmann/json.hpp4041 }
LOWinclude/nlohmann/json.hpp5361#if defined(__GNUC__) && !defined(__clang__) && __cplusplus >= 202002L
LOWinclude/nlohmann/adl_serializer.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/byte_container_with_subtype.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/json_fwd.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/hash.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/json_ref.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/value_t.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/string_concat.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/string_utils.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/macro_scope.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/macro_scope.hpp21#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
LOWinclude/nlohmann/detail/macro_scope.hpp41 #define JSON_HAS_CPP_14
LOWinclude/nlohmann/detail/macro_scope.hpp61#ifdef __has_include
LOWinclude/nlohmann/detail/macro_scope.hpp81 // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
LOWinclude/nlohmann/detail/macro_scope.hpp101 #undef JSON_HAS_FILESYSTEM
LOWinclude/nlohmann/detail/macro_scope.hpp121#endif
LOWinclude/nlohmann/detail/macro_scope.hpp141 #define JSON_HAS_RANGES 1
LOWinclude/nlohmann/detail/macro_scope.hpp161#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address)
LOWinclude/nlohmann/detail/macro_scope.hpp181 #include <cstdlib>
LOWinclude/nlohmann/detail/macro_scope.hpp201 #define JSON_INTERNAL_CATCH JSON_CATCH_USER
LOWinclude/nlohmann/detail/macro_scope.hpp401#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4)
LOWinclude/nlohmann/detail/macro_scope.hpp421#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19
LOWinclude/nlohmann/detail/macro_scope.hpp441#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19
LOWinclude/nlohmann/detail/macro_scope.hpp521 NLOHMANN_JSON_DOUBLE_PASTE5, \
LOWinclude/nlohmann/detail/macro_scope.hpp541#define NLOHMANN_JSON_DOUBLE_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v
LOWinclude/nlohmann/detail/macro_scope.hpp761 \
LOWinclude/nlohmann/detail/macro_scope.hpp781#ifndef JSON_USE_GLOBAL_UDLS
LOWinclude/nlohmann/detail/json_pointer.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/json_pointer.hpp721 // - slash: position of the last read slash (or end of string)
LOWinclude/nlohmann/detail/exceptions.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/exceptions.hpp21#include <nlohmann/detail/string_escape.hpp>
LOWinclude/nlohmann/detail/abi_macros.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/abi_macros.hpp21#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
LOWinclude/nlohmann/detail/abi_macros.hpp41#endif
LOWinclude/nlohmann/detail/macro_unscope.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/macro_unscope.hpp21#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION
LOWinclude/nlohmann/detail/macro_unscope.hpp41 #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM
LOWinclude/nlohmann/detail/conversions/to_chars.hpp1// __ _____ _____ _____
LOWinclude/nlohmann/detail/conversions/to_chars.hpp81 */
LOWinclude/nlohmann/detail/conversions/to_chars.hpp221 // v = f * 2^e.
LOWinclude/nlohmann/detail/conversions/to_chars.hpp261//
LOWinclude/nlohmann/detail/conversions/to_chars.hpp281//
LOWinclude/nlohmann/detail/conversions/to_chars.hpp321/*!
LOWinclude/nlohmann/detail/conversions/to_chars.hpp341 //
LOWinclude/nlohmann/detail/conversions/to_chars.hpp361 // e <= +1023 (max IEEE exponent)
LOWinclude/nlohmann/detail/conversions/to_chars.hpp621 std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e
LOWinclude/nlohmann/detail/conversions/to_chars.hpp641 //
LOWinclude/nlohmann/detail/conversions/to_chars.hpp661 // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e)
631 more matches not shown…
Fake / Example Data12 hits · 12 pts
SeverityFileLineSnippet
LOWtests/src/unit-udt.cpp435 optPerson.reset(new udt::person{{42}, {"John Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owni
LOWtests/src/unit-udt.cpp444 auto person = udt::person{{42}, {"John Doe"}, udt::country::russia};
LOWtests/src/unit-udt.cpp548 optPerson.reset(new udt::person{{42}, {"John Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-m
LOWtests/src/unit-udt.cpp557 auto person = udt::person{{42}, {"John Doe"}, udt::country::russia};
LOW…mann_define_type_intrusive_only_serialize_explicit.cpp12 std::string name = "John Doe";
LOW…s/examples/nlohmann_define_type_intrusive_explicit.cpp12 std::string name = "John Doe";
LOW…ohmann_define_type_intrusive_with_default_explicit.cpp12 std::string name = "John Doe";
LOW…nn_define_type_non_intrusive_with_default_explicit.cpp11 std::string name = "John Doe";
LOW…hmann_define_type_non_intrusive_with_default_macro.cpp11 std::string name = "John Doe";
LOW…docs/examples/nlohmann_define_type_intrusive_macro.cpp12 std::string name = "John Doe";
LOW…lohmann_define_type_intrusive_only_serialize_macro.cpp12 std::string name = "John Doe";
LOW…/nlohmann_define_type_intrusive_with_default_macro.cpp12 std::string name = "John Doe";
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICAL.github/workflows/comment_check_amalgamation.yml56 const opts = github.rest.issues.listForRepo.endpoint.merge({
Deep Nesting9 hits · 9 pts
SeverityFileLineSnippet
LOWtools/serve_header/serve_header.py160
LOWtools/serve_header/serve_header.py195
LOWtools/serve_header/serve_header.py223
LOWtools/amalgamate/amalgamate.py144
LOWtools/gdb_pretty_printer/nlohmann-json.py16
LOWtests/thirdparty/imapdl/filterbr.py8
LOWtests/thirdparty/imapdl/filterbr.py37
LOWtests/thirdparty/imapdl/filterbr.py84
LOWdocs/mkdocs/scripts/check_structure.py19
Unused Imports3 hits · 3 pts
SeverityFileLineSnippet
LOWtools/amalgamate/amalgamate.py32
LOWtools/amalgamate/amalgamate.py33
LOWtools/amalgamate/amalgamate.py34
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippet
LOWtools/serve_header/serve_header.py410 except Exception:
LOWtools/gdb_pretty_printer/nlohmann-json.py32 except Exception:
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWtools/serve_header/serve_header.py249class HeaderRequestHandler(SimpleHTTPRequestHandler): # lgtm[py/missing-call-to-init]