MCPcopy Create free account
hub / github.com/comaps/comaps / FromJSONObject

Function FromJSONObject

libs/cppjansson/cppjansson.hpp:161–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160template <typename T>
161T 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
174template <typename T>
175void FromJSONObject(json_t * root, std::string const & field, T & result)

Callers 15

FromJsonObjectOrValueMethod · 0.50
operator()Method · 0.50
operator()Method · 0.50
GetIdFromJsonFunction · 0.50
GetWeightsFromJsonFunction · 0.50
GetPointFromJsonFunction · 0.50
GetTimeTableFromJsonFunction · 0.50
GetTranslationsFromJsonFunction · 0.50
GetShapeLinkFromJsonFunction · 0.50
GetFrequencyIntervalsFunction · 0.50
GetScheduleFromJsonFunction · 0.50
ReadFunction · 0.50

Calls 3

GetJSONObligatoryFieldFunction · 0.85
FromJSONFunction · 0.70
resizeMethod · 0.45

Tested by

no test coverage detected