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
- Repository root
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd 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.