Make explicit conversion to string in JSON parsing

For some reason old code no longer works, but including explicit request for string fixes the problem.
master
Tomasz Golinski 2022-05-16 21:11:43 +02:00
rodzic 59d8b7007c
commit fd8ceea907
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -162,7 +162,7 @@ Caches Okapi::get_caches(const std::set<std::string>& codes) const {
c.terr = el.value()["terrain"];
c.owner = el.value()["owner"]["username"];
c.owner_uuid = el.value()["owner"]["uuid"];
c.pos = Position(el.value()["location"]);
c.pos = Position(el.value()["location"].get<std::string>());
c.origin = service;
c.fav = el.value()["recommendations"];
if (!el.value()["rating"].is_null()) c.rating = el.value()["rating"];