Loading...
Searching...
No Matches
Go to the documentation of this file.
31#define GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, name, type, jtype, mandatory, def) \
32 type field_##name = static_cast<type>(def); \
33 bool field_##name##_found = false; \
34 (void)field_##name##_found; \
35 do if (json.HasMember(#name)) \
37 if (json[#name].Is##jtype()) \
39 field_##name = static_cast<type>(json[#name].Get##jtype()); \
40 field_##name##_found = true; \
44 LOG_ERROR("Field " << #name << " found in JSON, but not " << #jtype); \
50 LOG_ERROR("Field " << #name << " not found in JSON"); \