Is there a list of JSON objects that will certainly be present when working with the Google Places API service? I assume “geometry” , “location”, and “name” will always be returned in the JSON page, but I just found out the hard way that “opening_hours” is only present for certain locations. I need to add extra try catch blocks for entries that are not guaranteed to be present. Anyone have info on which entries are or aren’t guaranteed?
I just fixed a bug in my android app that was caused because I was trying to call an object that was only present for some (but not all) of the entries in the Google Places API. Would rather not add extra try catches where I don’t need them…
None of the results in the
resultsarray are guaranteed to be returned as mentioned in the documentation:However, all the parameters except
opening_hours,events[]andratingshould be returned.