Mercurial > minori
annotate src/include/json.h @ 7:07a9095eaeed
Update
Refactored some code, moved some around
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Thu, 24 Aug 2023 23:11:38 -0400 |
| parents | 1d82f6e04d7d |
| children |
| rev | line source |
|---|---|
|
6
1d82f6e04d7d
Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
1 #include "../../dep/json/json.h" |
| 7 | 2 #ifndef __json_h |
| 3 #define __json_h | |
|
6
1d82f6e04d7d
Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
4 namespace JSON { |
| 7 | 5 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); | |
| 7 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); | |
|
6
1d82f6e04d7d
Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
9 } |
| 7 | 10 #endif // __json_h |
