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++
Raw Normal View History

2018-08-10 03:28:31 +02:00
#include <iostream>
#include <jsoncpp/json/json.h>
#include "xdgjson.hpp"
2019-01-01 09:42:42 +01:00
int main()
2018-08-10 03:28:31 +02:00
{
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();
}