json.netはクラスオブジェクトを単純な辞書にシリアライズできますか?
public class CommitData
{
public AddressDTO Property { get; set; }
public DateTime? Appointment { get; set; }
public DateTime? Closed { get; set; }
public DateTime? Created { get; set; }
public string LenderRef { get; set; }
public string YearBuilt { get; set; }
public IDictionary<string, object> Custom { get; set; }
}
public class AddressDTO
{
public string Address1 { get; set; }
public string Address2 { get; set; }
public string Address3 { get; set; }
public string Town { get; set; }
public string County { get; set; }
public string Postcode { get; set; }
}
シリアル化するときに取得したい:
{
"Property.Address1": "",
"Property.Address2": "uyg",
"LenderRef": "yguyg",
"Closed": date_here
}
同様に、上記のような json 文字列を CommitData オブジェクトに逆シリアル化しますか?