nlohmann/json ? reverse-engineered prompt

Reverse engineered prompt

Build me a small modern C++ JSON library that feels as easy as using JSON in Python. It should let me create JSON values with natural syntax, read and write JSON files, access objects and arrays like normal C++ containers, and convert to and from strings, numbers, booleans, vectors, maps, and my own simple structs.

Please make it easy to drop into another project as one header with no extra runtime dependencies, and include CMake support for people who want that. It should support parsing, pretty printing, serialization and deserialization, JSON Pointer, JSON Patch, merge patch, and common binary formats like BSON, CBOR, MessagePack, and UBJSON.

Please add clear examples, solid unit tests for normal and error cases, and basic docs showing how to install it and use it in a tiny program. Keep the public API friendly and consistent for C++11 users.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab