Mercurial > minori
diff include/core/json.h @ 64:fe719c109dbc
*: update
1. add media tracking ability, and it displays info on the `now playing` page
2. the `now playing` page now actually shows something
3. renamed every page class to be more accurate to what it is
4. ...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 23:15:43 -0400 |
parents | 5c0397762b53 |
children | b315f3759c56 |
line wrap: on
line diff
--- a/include/core/json.h Sun Oct 01 06:39:47 2023 -0400 +++ b/include/core/json.h Sun Oct 01 23:15:43 2023 -0400 @@ -1,10 +1,15 @@ #ifndef __core__json_h #define __core__json_h + #include "../../dep/json/json.h" + namespace JSON { + std::string GetString(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, std::string def = ""); int GetInt(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, int def = 0); bool GetBoolean(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, bool def = false); double GetDouble(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, double def = 0); + } // namespace JSON + #endif // __core__json_h \ No newline at end of file