You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The properties dictionary contained on the JSON feature is not being used while decoding the objects, specifically the wikidata field. The wikidata field is only decoded while decoding the superiorPlaceMarks as it is included on the main three.
Example (trimmed) JSON feature response
{ context = [{
id = "country.3124";
"short_code" = mx;
text = Mexico;
wikidata = Q96;
}];
id = "region.216972";
"place_name" = "M\U00e9xico, Mexico";
"place_type" = [region];
properties = {
"short_code" = "MX-MEX";
wikidata = Q82112;
};
relevance = 1;
text = "M\U00e9xico";
type = Feature;
}
if let rawIdentifier = try container.decodeIfPresent(String.self, forKey: .wikidataItemIdentifier) {
let identifier = rawIdentifier.trimmingCharacters(in: .whitespacesAndNewlines)
assert(identifier.hasPrefix("Q"))
wikidata = identifier
}
My temporal workaround will be to add wikidata variable to Property struct and do an elseif to populate original wikidata field
else if let wiki = properties?.wikidata{
wikidata = wiki
}
The text was updated successfully, but these errors were encountered:
The properties dictionary contained on the JSON feature is not being used while decoding the objects, specifically the wikidata field. The wikidata field is only decoded while decoding the superiorPlaceMarks as it is included on the main three.
Example (trimmed) JSON feature response
My temporal workaround will be to add wikidata variable to Property struct and do an elseif to populate original wikidata field
The text was updated successfully, but these errors were encountered: