json.h VS yaml-cpp

Compare json.h vs yaml-cpp and see what are their differences.

json.h

🗄️ single header json parser for C and C++ (by sheredom)

yaml-cpp

A YAML parser and emitter in C++ (by jbeder)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
json.h yaml-cpp
- 12
660 4,763
- -
2.9 7.4
3 months ago about 1 month ago
C C++
The Unlicense MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

json.h

Posts with mentions or reviews of json.h. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning json.h yet.
Tracking mentions began in Dec 2020.

yaml-cpp

Posts with mentions or reviews of yaml-cpp. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-02-05.
  • yaml-cpp VS rapidyaml - a user suggested alternative
    2 projects | 5 Feb 2022
  • How do you manage third-party libraries
    8 projects | /r/cpp_questions | 1 Feb 2022
    cd /tmp git clone --depth 1 --branch 8.1.1 https://github.com/fmtlib/fmt.git && \ cd fmt && \ mkdir build && \ cd build && \ cmake -DFMT_TEST=OFF .. && \ make && \ make install cd /tmp git clone --depth 1 --branch yaml-cpp-0.7.0 https://github.com/jbeder/yaml-cpp.git && \ cd yaml-cpp && \ mkdir build && \ cd build && \ cmake -DYAML_CPP_BUILD_TESTS=OFF .. && \ make && \ make install # and so on
    8 projects | /r/cpp_questions | 1 Feb 2022
    FetchContent_Declare(yaml-cpp GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git GIT_TAG yaml-cpp-0.7.0 GIT_SHALLOW TRUE ) set(YAML_CPP_BUILD_TESTS OFF) FetchContent_MakeAvailable(yaml-cpp)
  • How to deal with unmaintained crates? (eg. yaml-rust)
    6 projects | /r/rust | 9 Jan 2022
    Some context, In my day job, I'm working on a custom format that is based on yaml but extends it. We're still using C++, so we the used yaml-cpp as a base for our parser and it was great for that purpose. laying with rust on Advent of Code lately I also got sent back to reality... Not having rust enums, match, great string handling, iterators when working with my AST was hard. So I wanted to try to implement the same parser in Rust as an example to my teammates of how great rust can be.
  • Libraries
    14 projects | /r/cpp_questions | 7 Dec 2021
    yaml-cpp
  • Modern yaml library with clear docs
    4 projects | /r/cpp_questions | 17 Mar 2021
    I've found is yaml-cpp. The API seems fine
    4 projects | /r/cpp_questions | 17 Mar 2021
    I've searched around, and the only thing I've found is yaml-cpp. The API seems fine, but I'm not satisfied with the docs. There's a little tutorial which covers most of the stuff that I'd want to know; but it doesn't properly address error handling. I'm not going to use a library if I don't know what it does in the case of an error! As far as I can find, the only docs are the tutorial, and an api reference which is difficult to navigate, and doesn't seem to have much meaningful information. There is also an 'old tutorial', which seem to refer to an older version of yaml-cpp; and so presumably it isn't relevant any longer.
  • I need help with list project
    2 projects | /r/cpp_questions | 4 Mar 2021
    If you want a file format that has more readability, YAML is probably your best bet.
  • How to read from a file
    3 projects | /r/Cplusplus | 1 Jan 2021
    Can this not be parsed as YAML? (https://github.com/jbeder/yaml-cpp)

What are some alternatives?

When comparing json.h and yaml-cpp you can also consider the following projects:

Boost.PropertyTree - Boost.org property_tree module

ArduinoJson - 📟 JSON library for Arduino and embedded C++. Simple and efficient.

json - JSON for Modern C++

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

JsonCpp - A C++ library for interacting with JSON.

JSON++ - A JSON parser in C++

json-c - https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/

LIBUCL - Universal configuration library parser

CppServer - Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

Jansson - C library for encoding, decoding and manipulating JSON data