From fd8ceea90797078a462355d3c19212aa5ee665e2 Mon Sep 17 00:00:00 2001 From: Tomasz Golinski Date: Mon, 16 May 2022 21:11:43 +0200 Subject: [PATCH] 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. --- okapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/okapi.cpp b/okapi.cpp index 1f2e8ce..2f3e6a2 100644 --- a/okapi.cpp +++ b/okapi.cpp @@ -162,7 +162,7 @@ Caches Okapi::get_caches(const std::set& 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()); c.origin = service; c.fav = el.value()["recommendations"]; if (!el.value()["rating"].is_null()) c.rating = el.value()["rating"];