6 #ifndef TURI_UNITY_JSON_UTIL_HPP 7 #define TURI_UNITY_JSON_UTIL_HPP 8 #include <core/data/json/json_include.hpp> 9 #include <model_server/lib/api/client_base_types.hpp> 23 JSONNode v(JSON_NULL);
31 if (std::isnan(val.
get<
double>())) {
33 JSONNode v(JSON_NULL);
38 return JSONNode(name, val.
get<
double>());
44 JSONNode vec(JSON_ARRAY);
45 for (
size_t i = 0;i < v.size(); ++i) {
46 JSONNode vecval(JSON_NUMBER);
48 vec.push_back(vecval);
55 JSONNode v(JSON_NULL);
61 JSONNode v(JSON_NULL);
std::vector< double > flex_vec
flex_type_enum get_type() const
JSONNode flexible_type_to_json(const flexible_type &val, std::string name)