Mercurial > minori
diff include/core/json.h @ 317:b1f4d1867ab1
services: VERY initial Kitsu support
it only supports user authentication for now, but it's definitely
a start.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 04:07:10 -0400 |
parents | 3ec7804abf17 |
children | 1686fac290c5 |
line wrap: on
line diff
--- a/include/core/json.h Tue Jun 11 15:11:09 2024 -0400 +++ b/include/core/json.h Wed Jun 12 04:07:10 2024 -0400 @@ -24,6 +24,7 @@ namespace JSON { +/* TODO: refactor these to return a std::optional... */ template<typename T = std::string> T GetString(const nlohmann::json& json, const nlohmann::json::json_pointer& ptr, T def) { if (json.contains(ptr) && json[ptr].is_string())