|
FlatImage
A configurable Linux containerization system
|
A database that interfaces with nlohmann json. More...
#include <filesystem>#include <fstream>#include <nlohmann/json.hpp>#include <variant>#include "../std/expected.hpp"#include "../std/concept.hpp"#include "../macro.hpp"Go to the source code of this file.
Classes | |
| class | ns_db::Db |
| A type-safe wrapper around nlohmann::json for database operations. More... | |
Namespaces | |
| namespace | ns_db |
| JSON-based configuration database layer. | |
Concepts | |
| concept | ns_db::anonymous_namespace{db.hpp}::IsString |
Typedefs | |
| using | ns_db::object_t = nlohmann::basic_json<>::object_t |
| using | ns_db::anonymous_namespace{db.hpp}::json_t = nlohmann::json |
| using | ns_db::KeyType = json_t::value_t |
Functions | |
| std::ostream & | ns_db::operator<< (std::ostream &os, Db const &db) |
| Outputs the JSON data to an output stream. | |
| Value< Db > | ns_db::read_file (fs::path const &path_file_db) |
| Deserializes a JSON file into a Db object. | |
| Value< void > | ns_db::write_file (fs::path const &path_file_db, Db &db) |
| Serializes a Db object and writes it to a JSON file. | |
| template<ns_concept::StringRepresentable S> | |
| Value< Db > | ns_db::from_string (S &&s) |
| Parses a JSON string and creates a Db object. | |
A database that interfaces with nlohmann json.
Definition in file db.hpp.