using WIN32_LEAN_AND_MEAN to avoid redefinition of symbols in winsock.h
toJSON and toPTree are unresolved otherwise