#pragma once #include "nlohmann/json.hpp" namespace nsUtils { template bool IsWithinTol(T Offset, T Tol) { if (Offset > Tol || Offset < -Tol) { return false; } return true; } template inline void getValue(const nlohmann::json& j, const std::string& fieldname, T& value) { if (j.contains(fieldname)) { j.at(fieldname).get_to(value); } } }