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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
2 #ifndef __json_h
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
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
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
5 std::string GetString(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, std::string def = "");
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
6 int GetInt(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, int def = 0);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
7 bool GetBoolean(nlohmann::json const& json, nlohmann::json::json_pointer const& ptr, bool def = false);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
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
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
10 #endif // __json_h