24 #ifndef FABLE_UTILITY_HPP_ 25 #define FABLE_UTILITY_HPP_ 47 Json read_json_from_stdin();
53 Json read_json(
const std::string& filepath_or_stdin);
55 Json read_json_with_interpolation(
const std::string& filepath_or_stdin,
56 const Environment* env =
nullptr);
58 Conf read_conf_from_file(
const char* filepath);
60 Conf read_conf_from_stdin();
62 inline Conf read_conf_from_file(
const std::string& filepath) {
63 return read_conf_from_file(filepath.c_str());
66 Conf read_conf(
const std::string& filepath_or_stdin);
68 Conf read_conf_with_interpolation(
const std::string& filepath_or_stdin,
69 const Environment* env =
nullptr);
74 std::string
indent_string(std::string s,
const std::string& indent =
" ");
76 void pretty_print(
const ConfError& e, std::ostream& os);
78 void pretty_print(
const SchemaError& e, std::ostream& os);
82 #endif // FABLE_UTILITY_HPP_
nlohmann::json Json
Definition: json.hpp:62
Json read_json_from_file(const char *filepath)
Definition: utility.cpp:37
std::string indent_string(std::string s, const std::string &indent=" ")
Definition: utility.cpp:98