Created
May 23, 2019 14:35
-
-
Save rdelrosario/ec505c66616aec743531ecb2aa05932e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Newtonsoft.Json.Linq; | |
namespace TrackingSample.Models | |
{ | |
public class GooglePlace | |
{ | |
public string Name { get; set; } | |
public double Latitude { get; set; } | |
public double Longitude { get; set; } | |
public string Raw { get; set; } | |
public GooglePlace(JObject jsonObject) | |
{ | |
Name = (string)jsonObject["result"]["name"]; | |
Latitude = (double)jsonObject["result"]["geometry"]["location"]["lat"]; | |
Longitude = (double)jsonObject["result"]["geometry"]["location"]["lng"]; | |
Raw = jsonObject.ToString(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment