1
我使用了一些回放測試的類型redis的客戶就在昨天一個小DTO:ServiceStack json序列化器序列化爲空對象{}。
public class OrderDto
{
public int OrderNo;
public double Subtotal;
public double Total;
}
這工作得與串行器(我假設默認爲Redis的客戶端JSON序列化)的罰款。我會得到這樣的事情在Redis的:
"{\"OrderNo\":1,\"Subtotal\":10,\"Total\":11.37}"
現在,當我把它擴展到這樣的事情:
public class CalcOrderDto
{
public int OrderNo;
public double MerchandiseQuantity;
public double MerchandiseGross;
public double MerchandiseAdjustment;
public double MerchandiseTaxable;
public double MerchandiseNet;
public double MerchandiseTaxesTotal;
public double ShippingQuantity;
public double ShippingGross;
public double ShippingAdjustment;
public double ShippingTaxable;
public double ShippingNet;
public double ShippingTaxesTotal;
public double FinalQuantity;
public double FinalGross;
public double FinalAdjustment;
public double FinalTaxable;
public double FinalNet;
public double FinalTaxesTotal;
}
現在我只得到這樣的:
"{}"
我的問題是,爲什麼!?這在另一個Web服務項目中也是一個問題,所以我現在只提供XML。請幫忙。