| 224 | } |
| 225 | |
| 226 | JsonArray Json::toArray() const { |
| 227 | if (type() != Type::Array) |
| 228 | throw JsonException::format("Improper conversion to JsonArray from {}", typeName()); |
| 229 | return *m_data.get<JsonArrayConstPtr>(); |
| 230 | } |
| 231 | |
| 232 | JsonObject Json::toObject() const { |
| 233 | if (type() != Type::Object) |