- Home /
fromjson array ends up null
I am having an issue with the results being null, despite having the proper information coming from google api? Any ideas?
Google Json snippet to show results does have values
"results" : [ { "geometry" : { "location" : { "lat" : 53.4713048, "lng" : -2.2474693 }, "viewport" : { "northeast" : { "lat" : 53.47187645, "lng" : -2.2473777 }, "southwest" : { "lat" : 53.47111425000001, "lng" : -2.2475661 } } },
PlacesApiQueryResponse result = JsonUtility.FromJson<PlacesApiQueryResponse>(webResponse.text);
public class PlacesApiQueryResponse
{
public List<object> html_attributions { get; set; }
public List<Result> results { get; set; }
public string status { get; set; }
}
Your answer
Follow this Question
Related Questions
How to rapidly assign and reassign component data within gameobjects based off API data 0 Answers
Yelp API- Latitude/Longitude parameter problem {Key/Value} 2 Answers
Google play save doesn't work 1 Answer
Google map apis in unity (Directions,marker,...) 0 Answers
Reading JSON response from Google Sheets in unity ( most places have WWW.text) 1 Answer