RepoPilot

nlohmann / json

Search nlohmann/json

GitHub

Code

How nlohmann/json is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Likely start-up file
  3. Suggested starting pointAI
  4. Suggested starting pointAI
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add custom C++ type serialization

  • Define a to_json function in your namespace accepting (json&, const YourType&)
  • Reference the nlohmann ADL hooks pattern documented via adl_serializer.hpp
  • Implement from_json(const json&, YourType&) for deserialization symmetry

Implement custom SAX event handler

  • Create a class with methods: null(), boolean(bool), number_integer(), number_unsigned(), number_float(), string(string_t&), start_object(size_t), key(string_t&), end_object(), start_array(size_t), end_array()
  • Instantiate parser<input_adapter_t>::parse() with your SAX handler as second argument

Support additional binary format

  • Add deserialization logic to binary_reader by extending the from_msgpack/bson/cbor/ubjson pattern
  • Add corresponding serialization logic to binary_writer
  • Expose public API via json::from_<format>() and to_<format>() helper functions in single header

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.
  • The file list is newer than the written guide, so descriptions and suggested changes may describe older code.

Code quality and hotspots

Largest source files

  • Branch points38 per file on average
  • Code issues0 errors, 364 warnings
  • Largest file4,625 lines
  • Hotspot load5 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions17 workflows
  • Tests205 test files0.47 test files per source file (file count, not coverage)
  • Dependency updatesCodeQL · Dependabot

Test folders: tests/benchmarks/json_view · tests/abi/config · tests/abi/diag

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.