VkNet.Model.Place.FromJson C# (CSharp) Method

FromJson() public static method

Разобрать из json.
public static FromJson ( VkResponse response ) : Place
response VkResponse Ответ сервера.
return Place
        public static Place FromJson(VkResponse response)
        {
            var place = new Place
            {
                Id = response["place_id"] ?? response["id"],
                Title = response["title"],
                Latitude = (int?)(double?)response["latitude"],       // TODO: refactor this shit
                Longitude = (int?)(double?)response["longitude"],     // TODO: refactor this shit
                TypeId = response["type"],
                CountryId = response["country_id"],
                CityId = response["city_id"],
                Address = response["address"],
                ShowMap = response["showmap"],

                Country = response["country"], // установлено экcпериментальным путем
                City = response["city"] // установлено экcпериментальным путем
            };

            return place;
        }