I have a JSON file where on of the properties is:
"Location": {
"Latitude": 38.7080404,
"Longitude": -9.1436747
}
And I have a few classes with a Location property:
public class Example {
public IPoint Location { get; set; }
}
A IPoint can be created as follows:
Example example = new Example();
example.Location = new Point(new Coordinate(latitude, longitude)) { SRID = 4326 };
How can I define a Newtonsoft JSon.Net rule to convert from JSON to any property of type IPoint?