Added convenience swtich for disabling JSON support in SDK build

This commit is contained in:
Joseph Henry 2019-05-13 12:24:55 -07:00
parent 2d5c6fa975
commit 4743ad0b16
2 changed files with 7 additions and 0 deletions

View file

@ -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];