|
header_utils
|
Typedefs | |
| using | ghassanpl::formats::json::jtype |
Smaller name for nlohmann::json::value_t. | |
Functions | |
| expected< nlohmann::json, std::error_code > | ghassanpl::formats::json::load_file (std::filesystem::path const &from) |
| nlohmann::json | ghassanpl::formats::json::try_load_file (std::filesystem::path const &from, nlohmann::json or_json) |
| nlohmann::json | ghassanpl::formats::json::try_load_file (std::filesystem::path const &from) |
| void | ghassanpl::formats::json::save_file (std::filesystem::path const &to, nlohmann::json const &j, bool pretty=true) |
| constexpr const char * | ghassanpl::formats::json::type_name (nlohmann::json::value_t type) noexcept |
| template<typename VISIT_FUNC> | |
| auto | ghassanpl::formats::json::visit (nlohmann::json const &j, VISIT_FUNC &&func) |
| Calls func with the actual value inside j; similar to std::visit. | |
Variables | |
| const nlohmann::json | ghassanpl::formats::json::empty_json |
| const nlohmann::json | ghassanpl::formats::json::empty_json_array |
| const nlohmann::json | ghassanpl::formats::json::empty_json_object |
Smaller name for nlohmann::json::value_t.
Definition at line 163 of file json_helpers.h.
|
inline |
Definition at line 165 of file json_helpers.h.
|
inline |
Definition at line 188 of file json_helpers.h.
|
inline |
Definition at line 181 of file json_helpers.h.
|
inline |
Definition at line 174 of file json_helpers.h.
|
constexprnoexcept |
Definition at line 195 of file json_helpers.h.
| auto ghassanpl::formats::json::visit | ( | nlohmann::json const & | j, |
| VISIT_FUNC && | func ) |
Calls func with the actual value inside j; similar to std::visit.
Definition at line 221 of file json_helpers.h.
|
inline |
Definition at line 158 of file json_helpers.h.
|
inline |
Definition at line 159 of file json_helpers.h.
|
inline |
Definition at line 160 of file json_helpers.h.