iKvxx
Modern C++17 bindings for iKv, with RAII ownership and a JsonCpp-style Value API.
For installation, the complete API reference, format details, binary layout, testing, and more examples, see the iKvxx Wiki.
Simple syntax
ikv2 "player_save"
{
"title" "iKvxx demo"
"version" 2
"player" {
"name" "Ada"
"alive" true
"speed" 12.5
}
"inventory" [
"wrench"
"battery"
"map"
]
}
Library example
#include <ikvxx/ikvxx.hpp>
int main()
{
ikv::Value root(ikv::objectValue, "player_save");
root["title"] = "iKvxx demo";
root["version"] = 2;
auto player = root.makeObject("player");
player["name"] = "Ada";
player["alive"] = true;
player["speed"] = 12.5;
auto inventory = root.makeArray("inventory", ikv::stringValue);
inventory.append("wrench");
inventory.append("battery");
inventory.append("map");
root.write("player_save.ikv");
auto loaded = ikv::Value::load("player_save.ikv");
return loaded["player"]["alive"].asBool() ? 0 : 1;
}
License
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.
The iKv submodule includes its own license file.
Description
Languages
C++
89.9%
CMake
7%
Batchfile
3.1%