This repository has been archived on 2020-05-16. You can view files and clone it, but cannot push or open issues or pull requests.
xdgjson/src/example.cpp

14 lines
309 B
C++

#include <iostream>
#include <jsoncpp/json/json.h>
#include "xdgjson.hpp"
int main()
{
xdgjson config("test.json", "xdgjson");
config.read();
Json::Value &json = config.get_json();
std::cout << "Hello: " << json["Hello"].asString() << '\n';
json["Hello"] = "World";
config.write();
}