Overview of JSON for Modern C++
masterJSON for Modern C++ is a single-header, C++11 compliant library designed for intuitive JSON manipulation. It aims to make JSON feel like a first-class data type in C++ using operator overloading and modern syntax.
Key Characteristics
- Trivial Integration: The library consists of a single header file
json.hpp. It has no external dependencies and requires no complex build system or special compiler flags. - Intuitive Syntax: Uses C++ operator magic to provide a syntax similar to dynamic languages like Python.
- High Reliability: Heavily unit-tested with 100% coverage, checked with Valgrind and Clang Sanitizers, and continuously fuzzed by Google OSS-Fuzz.
- Memory Model: By default, it uses
std::stringfor strings,int64_t/uint64_t/doublefor numbers,std::mapfor objects,std::vectorfor arrays, andboolfor Booleans. Thebasic_jsonclass can be templated to use different underlying types if needed.