# JSON for Modern C++

> What if JSON was part of modern C++?

Source: https://talira.ai/catalog/json-for-modern-c-3jakz8vw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / parsing / json](https://talira.ai/categories/developer-tools/parsing/json), [languages / c cpp](https://talira.ai/categories/languages/c-cpp)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source.
- Free tier: yes[^2]
- Backed by: [Niels Lohmann](https://talira.ai/orgs/niels-lohmann.md)
- Creator: Niels Lohmann

JSON for Modern C++ (nlohmann/json) is a header-only C++11 library that makes JSON feel like a first-class C++ type: the whole library is one header, json.hpp, and a json value works like an STL container, with intuitive syntax for parsing, creating, accessing and dumping JSON. It converts arbitrary types to and from JSON, reads and writes the binary formats BSON, CBOR, MessagePack, UBJSON and BJData, and supports JSON Pointer, JSON Patch and diff, JSON Merge Patch, comments, ordered objects and use without exceptions. It's designed for easy integration and developer speed rather than being the fastest JSON parser.

## Links

- Website: https://json.nlohmann.me/
- GitHub: https://github.com/nlohmann/json
- Docs: https://json.nlohmann.me/api/basic_json/

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/nlohmann-json>[^1]

## Problems it solves

- parse and write JSON in C++
- a header-only JSON library I can drop into a C++ project
- convert my C++ structs to and from JSON
- read MessagePack or CBOR in C++

## Features

- single header, header-only
- STL-like json type
- arbitrary type conversions
- BSON, CBOR, MessagePack, UBJSON and BJData
- JSON Pointer, JSON Patch and Merge Patch
- works without exceptions

## Trust

Overall: 0.79 out of 1.
Signals: maintenance 1.00, adoption 0.94, momentum 0.76, community 1.00, backing 0.50, extensibility 0.00.

- last commit yesterday
- 512 commits in the last 90 days
- latest release v3.12.0 19 months ago
- 51.0k GitHub stars
- 398 contributors
- accepts sponsorship (Github, Custom)
- backed by Niels Lohmann
- created by Niels Lohmann

## Sources

[^1]: https://formulae.brew.sh/formula/nlohmann-json (checked 23 Nov 2026)
[^2]: https://github.com/nlohmann/json/blob/develop/LICENSE.MIT (checked 23 Nov 2026)
