| 476 | } |
| 477 | |
| 478 | Json Assets::json(String const& path) const { |
| 479 | auto components = AssetPath::split(path); |
| 480 | validatePath(components, true, false); |
| 481 | |
| 482 | return as<JsonData>(getAsset(AssetId{AssetType::Json, std::move(components)}))->json; |
| 483 | } |
| 484 | |
| 485 | Json Assets::fetchJson(Json const& v, String const& dir) const { |
| 486 | if (v.isType(Json::Type::String)) |