annotate include/core/json.h @ 30:4dc59e1a81a3
ci/win32: fix echo-ing to binfmt
ok, so apparently bash AUTOMATICALLY writes a newline to the end of
a file. why does it do this? nobody knows, but we can avoid it by
simply adding the `-n` flag
author
Paper <mrpapersonic@gmail.com>
date
Wed, 20 Sep 2023 00:53:11 -0400 (18 months ago)
parents
5c0397762b53
children
fe719c109dbc
rev
line source
9
+ − 1 #ifndef __core__json_h
+ − 2 #define __core__json_h
+ − 3 #include "../../dep/json/json.h"
+ − 4 namespace JSON {
+ − 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);
+ − 9 } // namespace JSON
+ − 10 #endif // __core__json_h