Mercurial > minori
diff include/core/json.h @ 9:5c0397762b53
INCOMPLETE: megacommit :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 10 Sep 2023 03:59:16 -0400 |
parents | |
children | fe719c109dbc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/core/json.h Sun Sep 10 03:59:16 2023 -0400 @@ -0,0 +1,10 @@ +#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