| 159 | |
| 160 | template <typename T> |
| 161 | T FromJSONObject(json_t const * root, char const * field) |
| 162 | { |
| 163 | auto const * json = base::GetJSONObligatoryField(root, field); |
| 164 | try |
| 165 | { |
| 166 | return FromJSON<T>(json); |
| 167 | } |
| 168 | catch (base::Json::Exception const & e) |
| 169 | { |
| 170 | MYTHROW(base::Json::Exception, ("An error occured while parsing field", field, e.Msg())); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | template <typename T> |
| 175 | void FromJSONObject(json_t * root, std::string const & field, T & result) |
no test coverage detected