35 auto As (
const QJsonValue& value)
37 if (value.type () != Expected) [[unlikely]]
40 if constexpr (Expected == QJsonValue::Array)
41 return value.toArray ();
42 if constexpr (Expected == QJsonValue::Object)
43 return value.toObject ();
44 if constexpr (Expected == QJsonValue::String)
45 return value.toString ();
46 if constexpr (Expected == QJsonValue::Double)
47 return value.toDouble ();
48 if constexpr (Expected == QJsonValue::Bool)
49 return value.toBool ();