$darkmode
Go to the source code of this file.
Functions | |
| Json | fable::read_json_from_file (const char *filepath) |
| Json | fable::read_json_from_stdin () |
| Json | fable::read_json_from_file (const std::string &filepath) |
| Json | fable::read_json (const std::string &filepath_or_stdin) |
| Json | fable::read_json_with_interpolation (const std::string &filepath_or_stdin, const Environment *env=nullptr) |
| Conf | fable::read_conf_from_file (const char *filepath) |
| Conf | fable::read_conf_from_stdin () |
| Conf | fable::read_conf_from_file (const std::string &filepath) |
| Conf | fable::read_conf (const std::string &filepath_or_stdin) |
| Conf | fable::read_conf_with_interpolation (const std::string &filepath_or_stdin, const Environment *env=nullptr) |
| std::string | fable::indent_string (std::string s, const std::string &indent=" ") |
| void | fable::pretty_print (const ConfError &e, std::ostream &os) |
| void | fable::pretty_print (const SchemaError &e, std::ostream &os) |
| std::string fable::indent_string | ( | std::string | s, |
| const std::string & | indent = " " |
||
| ) |
Indent a string in its entirety by the value of indent.
| Json fable::read_json_from_file | ( | const char * | filepath | ) |
Read a file and parse the contents to JSON.
If the file does not exist, a std::runtime_error is thrown. If the JSON is malformed, a std::invalid_argument is thrown.