Files
ActivityPubD/source/config.d
2024-01-28 22:36:38 -03:00

22 lines
349 B
D

module config;
import std.json;
import std.file;
import slf4d;
class Config {
JSONValue v;
private string m_path;
this(string path = "./config.json") {
this.m_path = path;
}
void load() {
debugF!"Trying to load config from %s"(this.m_path);
string contents = readText(this.m_path);
this.v = parseJSON(contents);
}
}