comparison 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
comparison
equal deleted inserted replaced
63:3d2decf093bb 64:fe719c109dbc
1 #ifndef __core__json_h 1 #ifndef __core__json_h
2 #define __core__json_h 2 #define __core__json_h
3
3 #include "../../dep/json/json.h" 4 #include "../../dep/json/json.h"
5
4 namespace JSON { 6 namespace JSON {
7
5 std::string GetString(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, std::string def = ""); 8 std::string GetString(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, std::string def = "");
6 int GetInt(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, int def = 0); 9 int GetInt(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, int def = 0);
7 bool GetBoolean(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, bool def = false); 10 bool GetBoolean(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, bool def = false);
8 double GetDouble(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, double def = 0); 11 double GetDouble(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, double def = 0);
12
9 } // namespace JSON 13 } // namespace JSON
14
10 #endif // __core__json_h 15 #endif // __core__json_h