6#include <unordered_map>
40 std::string
from(
const std::unordered_map<std::string, std::string> &map,
int pretty_print = 4) const noexcept;
46 std::
string from(const std::vector<std::unordered_map<std::
string, std::
string>> &arr,
int pretty_print = 4) const noexcept;
52 bool from(const std::
string &s, std::unordered_map<std::
string, std::
string> &m) const noexcept;
58 bool load(const std::
string &filename, std::unordered_map<std::
string, std::
string> &m) const noexcept;
64 bool from_array(const std::
string &s, std::vector<std::unordered_map<std::
string, std::
string>> &vm) const noexcept;
70 bool load_array(const std::
string &filename, std::vector<std::unordered_map<std::
string, std::
string>> &vm) const noexcept;
74 class json_helper_impl;
75 std::unique_ptr<json_helper_impl> impl;
JSON helper class.
Definition json_helper.h:16
json_helper()
Default constructor.
bool load(const std::string &filename, std::unordered_map< std::string, std::string > &m) const noexcept
Parse a JSON file into a C++ map from a file on disk.
bool from_array(const std::string &s, std::vector< std::unordered_map< std::string, std::string > > &vm) const noexcept
Parse a JSON array string into a vector of maps.
bool load_array(const std::string &filename, std::vector< std::unordered_map< std::string, std::string > > &vm) const noexcept
Load a JSON array file into a vector of maps.
std::string from(const std::unordered_map< std::string, std::string > &map, int pretty_print=4) const noexcept
Get the contents of a map as a string in JSON format.
~json_helper()
Destructor.
Namespace for the maze builder.
Definition algo_interface.h:6