summaryrefslogtreecommitdiff
path: root/osdep/OSUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/OSUtils.hpp')
-rw-r--r--osdep/OSUtils.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp
index c73f0bd3..2fe01979 100644
--- a/osdep/OSUtils.hpp
+++ b/osdep/OSUtils.hpp
@@ -45,6 +45,8 @@
#include <arpa/inet.h>
#endif
+#include "../ext/json/json.hpp"
+
namespace ZeroTier {
/**
@@ -267,6 +269,13 @@ public:
*/
static std::string platformDefaultHomePath();
+ static nlohmann::json jsonParse(const std::string &buf);
+ static std::string jsonDump(const nlohmann::json &j);
+ static uint64_t jsonInt(const nlohmann::json &jv,const uint64_t dfl);
+ static bool jsonBool(const nlohmann::json &jv,const bool dfl);
+ static std::string jsonString(const nlohmann::json &jv,const char *dfl);
+ static std::string jsonBinFromHex(const nlohmann::json &jv);
+
private:
static const unsigned char TOLOWER_TABLE[256];
};