What JSON library do you suggest?

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • RapidJSON

    A fast JSON parser/generator for C++ with both SAX/DOM style API

  • Thank you for your response. In reply to the first issue you raise, note that Tencent gives the following guidance: "Generally speaking, RapidJSON should be exception-safe (enough) to replace RAPIDJSON_ASSERT by an exception." If some of those functions are now noexcept, that would be... unfortunate. Especially if this is the kind of noexcept that gets randomly slapped on functions nowadays "because we can", rather than "because we must".

  • json

    JSON for Modern C++

  • https://github.com/nlohmann/json for ease of use; I'd suggest this as your general go to, and switch libraries if extreme performance is needed, and reading large amounts of JSON is part of the bottleneck. In which case https://github.com/simdjson/simdjson

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • simdjson

    Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks

  • https://github.com/nlohmann/json for ease of use; I'd suggest this as your general go to, and switch libraries if extreme performance is needed, and reading large amounts of JSON is part of the bottleneck. In which case https://github.com/simdjson/simdjson

    I am biased, so will suggest DAW JSON Link https://github.com/beached/daw_json_link. Fast and allows for a declarative mapping of JSON to your data structures. This allows it to optimize based on what you will be parsing and get past the intermediary DOM types. A nice benefit there is that the limits on the parser are the limits of your type(you can parse to a bigint or a rational type if needed)

  • JsonCpp

    A C++ library for interacting with JSON.

  • I like https://github.com/open-source-parsers/jsoncpp

  • json_struct

    json_struct is a single header only C++ library for parsing JSON directly to C++ structs and vice versa

  • json_struct for serializing directly to and from structs. Its one header only and performs on par with RapidJSON.

  • univalue

    An easy-to-use and competitively fast JSON parsing library for C++17, forked from Bitcoin Cash Node's own UniValue library.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • json_dto

    A small header-only library for converting data between json representation and c++ structs

  • json_dto on top of RapidJSON.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • DAW JSON Link v3, a JSON serialization/deserialization library, is released

    10 projects | /r/cpp | 1 Jul 2022
  • Is there something like GSON available in C++?

    3 projects | /r/cpp | 20 May 2022
  • Jsonifier, a Potential New JSON Parsing/Serializing Library, in C++

    3 projects | news.ycombinator.com | 21 Nov 2023
  • The state of Java Object Serialization libraries in Q2 2023

    5 projects | /r/java | 7 Apr 2023
  • Why is json logging the “standard”?

    2 projects | /r/golang | 10 Mar 2023