Skip to content

Instantly share code, notes, and snippets.

@rdelrosario
Created May 23, 2019 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdelrosario/ec505c66616aec743531ecb2aa05932e to your computer and use it in GitHub Desktop.
Save rdelrosario/ec505c66616aec743531ecb2aa05932e to your computer and use it in GitHub Desktop.
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