| 137 | } |
| 138 | |
| 139 | inline Priority get_priority(const rapidjson::Value& object) { |
| 140 | Priority priority = 0; |
| 141 | if (object.HasMember("priority")) { |
| 142 | if (!object["priority"].IsUint()) { |
| 143 | throw InputException("Invalid priority value."); |
| 144 | } |
| 145 | priority = object["priority"].GetUint(); |
| 146 | } |
| 147 | return priority; |
| 148 | } |
| 149 | |
| 150 | template <typename T> |
| 151 | inline std::optional<T> get_value_for(const rapidjson::Value& object, |
no test coverage detected