json11 alternatives and similar libraries
Based on the "JSON" category.
Alternatively, view json11 alternatives based on common mentions on social networks and blogs.
-
RapidJSON
A fast JSON parser/generator for C++ with both SAX/DOM style API -
ArduinoJson
📟 JSON library for Arduino and embedded C++. Simple and efficient. -
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/ -
JSMN
Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket -
json-parser
Very low footprint DOM-style JSON parser written in portable ANSI C -
frozen
JSON parser and generator for C/C++ with scanf/printf like interface. Targeting embedded systems. -
QJson
QJson is a qt-based library that maps JSON data to QVariant objects. -
qt-json
A simple class for parsing JSON data into a QVariant hierarchy and vice versa. -
libjson
a JSON parser and printer library in C. easy to integrate with any model. -
json-voorhees
A killer modern C++ library for interacting with JSON. -
json_dto
A small header-only library for converting data between json representation and c++ structs -
iod.metajson
Non-intrusive, high performance C++17 lightweight JSON de/serializer
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of json11 or a related project?
Popular Comparisons
README
json11
json11 is a tiny JSON library for C++11, providing JSON parsing and serialization.
The core object provided by the library is json11::Json. A Json object represents any JSON value: null, bool, number (int or double), string (std::string), array (std::vector), or object (std::map).
Json objects act like values. They can be assigned, copied, moved, compared for equality or order, and so on. There are also helper methods Json::dump, to serialize a Json to a string, and Json::parse (static) to parse a std::string as a Json object.
It's easy to make a JSON object with C++11's new initializer syntax:
Json my_json = Json::object {
{ "key1", "value1" },
{ "key2", false },
{ "key3", Json::array { 1, 2, 3 } },
};
std::string json_str = my_json.dump();
There are also implicit constructors that allow standard and user-defined types to be automatically converted to JSON. For example:
class Point {
public:
int x;
int y;
Point (int x, int y) : x(x), y(y) {}
Json to_json() const { return Json::array { x, y }; }
};
std::vector<Point> points = { { 1, 2 }, { 10, 20 }, { 100, 200 } };
std::string points_json = Json(points).dump();
JSON values can have their values queried and inspected:
Json json = Json::array { Json::object { { "k", "v" } } };
std::string str = json[0]["k"].string_value();
For more documentation see json11.hpp.