Вот моя оригинальная модель:
public class MyClass
{
public string Name{get;set;}
public double Latitude{get;set;}
public double Longitude{get;set;}
public string Street{get;set;}
public string City{get;set;}
public string State{get;set;}
public string Zip{get;set;}
}
И я хочу сопоставить ее с этим для целей сериализации JSON:
public class MyNewClass
{
public string Name{get;set;}
public Location{get;set;}
}
public class Location
{
public string Street{get;set;}
public string City{get;set;}
public string State{get;set;}
public string Zip{get;set;}
public Coordinates Coordinates{get;set;}
}
public class Coordinates
{
public double Latitude{get;set;}
public double Longitude{get;set;}
}
Кажется, я не могу понять правильный путьнастроить отображение.