diff options
Diffstat (limited to 'osdep/OSUtils.hpp')
-rw-r--r-- | osdep/OSUtils.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp index 324b7923..afdb1bf1 100644 --- a/osdep/OSUtils.hpp +++ b/osdep/OSUtils.hpp @@ -1,6 +1,6 @@ /* * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2018 ZeroTier, Inc. https://www.zerotier.com/ + * Copyright (C) 2011-2019 ZeroTier, Inc. https://www.zerotier.com/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * * -- * @@ -55,7 +55,9 @@ #endif #endif +#ifndef OMIT_JSON_SUPPORT #include "../ext/json/json.hpp" +#endif namespace ZeroTier { @@ -284,6 +286,7 @@ public: */ static std::string platformDefaultHomePath(); +#ifndef OMIT_JSON_SUPPORT static nlohmann::json jsonParse(const std::string &buf); static std::string jsonDump(const nlohmann::json &j,int indentation = 1); static uint64_t jsonInt(const nlohmann::json &jv,const uint64_t dfl); @@ -291,6 +294,7 @@ public: 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); +#endif // OMIT_JSON_SUPPORT private: static const unsigned char TOLOWER_TABLE[256]; |