annotate src/include/json.h @ 8:b1f73678ef61

update text paragraphs are now their own objects, as they should be
author Paper <mrpapersonic@gmail.com>
date Sat, 26 Aug 2023 03:39:34 -0400
parents 07a9095eaeed
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