Skip to content

ZeyadOsama/jsonCPP

Repository files navigation

jsonCPP

CI Actions Status stable contributions-welcome-orange

About

C++ JSON (*.json) Parser.

Usage

In your CMakeLists.txt file add these lines

add_subdirectory(json)
include_directories(include)

Then add this header in the file you'd like to have your parser at

#include <json.h>

using namespace json;

Multiple Files

vector<string> v;
v.push_back(json_file_path_1);
v.push_back(json_file_path_2);
v.push_back(json_file_path_3);

json::Value val = Parser::ParseMultiple(v);

Single Files

string json_file_path_1 = "<path>"
json::Value val = Parser::ParseFile(json_file_path_1);

Versioning

When installing jsonCPP, require it's version. For us, this is what major.minor.patch means:

  • major - MAJOR breaking changes; includes major new features, major changes in how the whole system works, and complete rewrites; it allows us to considerably improve the product, and add features that were previously impossible.
  • minor - MINOR breaking changes; it allows us to add big new features.
  • patch - NO breaking changes; includes bug fixes and non-breaking new features.

Changelog

For all-time versions, please see the CHANGELOG file.

License

This project is licensed under the MIT License - see the LICENSE file for details