| 126 | } |
| 127 | |
| 128 | float ReadFloatValue(const QJsonObject& json_object, const char* key) { |
| 129 | const QJsonValue& json_value = json_object.value(key); |
| 130 | assert(json_value != QJsonValue::Undefined); |
| 131 | assert(!json_value.isArray()); |
| 132 | assert(!json_value.isString()); |
| 133 | return static_cast<float>(json_value.toDouble()); |
| 134 | } |
| 135 | |
| 136 | bool ReadBoolValue(const QJsonObject& json_object, const char* key) { |
| 137 | const QJsonValue& json_value = json_object.value(key); |