1 #ifndef TMCAGLWM_JSON_HELPER_HPP
2 #define TMCAGLWM_JSON_HELPER_HPP
10 json_object *to_json(genivi::screen const *s);
11 json_object *to_json(genivi::controller::props_map const &s);
12 json_object *to_json(std::vector<uint32_t> const &v);
14 // We ned to manually unwrap numbers
16 wm::result<T> get(nlohmann::json const &j) {
19 std::istringstream s(j.get<std::string>());
21 return !s.eof() || s.fail() ? wm::Err<T>("Could not read int") : wm::Ok(r);
24 #endif // TMCAGLWM_JSON_HELPER_HPP