JSON.Net JsonConverter for DbGeography
问题 Long long struggles with this... Basically I have a model-first EF5 object with a DbGeography property. I would like to apply a JsonConverter that let's it roundtrip as simple latitude/longitude values. I'm using WebAPI. Looking for JSON output and input like so: { "location": { "geopoint": { "latitude":40.770712, "longitude":-73.962011 } } } Here is my class definition and JsonConverter: [MetadataType(typeof(QueryLocationMetadata))] partial class Location { } public class