Overview of JSON for Modern C++ API
masterJSON for Modern C++ is a C++11 header-only library. The primary interface is the nlohmann::json class, which is a specialization of the nlohmann::basic_json template.
Key functional areas include:
- Object Inspection: Checking types (e.g.,
is_number(),is_array()) and serializing values. - Value Access: Retrieving values via
get<T>(),value(), or implicit conversions. - Serialization/Deserialization: Parsing from strings or streams using
parse()and serializing to strings viadump(). - Binary Formats: Support for CBOR, MessagePack, UBJSON, and BSON.
- JSON Standards: Support for JSON Pointer (RFC 6901), JSON Patch (RFC 6902), and JSON Merge Patch (RFC 7396).