| 137 | } |
| 138 | |
| 139 | std::optional<bool> GetConfigBool(Value const& node, std::string_view const& key) |
| 140 | { |
| 141 | auto v = node.FindMember(key.data()); |
| 142 | if (v != node.MemberEnd()) { |
| 143 | if (v->value.IsBool()) { |
| 144 | return v->value.GetBool(); |
| 145 | } else { |
| 146 | OsiError("Config option '" << key << "' should be a boolean."); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | return {}; |
| 151 | } |
| 152 | |
| 153 | std::optional<int32_t> GetConfigInt(Value const& node, std::string_view const& key) |
| 154 | { |