次のような複雑なオブジェクトがあります
public class Cart
{
public int cartID{get; set;}
public bool IsActive{get; set;}
public double price{get; set;}
public List<Items> items{get; set;}
}
public class Item
{
public int itemID{get; set;}}
public string itemName{get;set;}
public double price{get; set;}
}
私のサービスは次のようにjsonを受け入れます
public class ServiceRequest
{
public string Data{get;set;}
public string ActionToBePerformed{get;set;}
}
ActionToBePerformed - 実行する操作を示します。
Data- はオブジェクト Cart のシリアル化されたリストです
Windows Phone 7 で Cart オブジェクトを文字列にシリアル化し、それをオブジェクト ServiceRequest のデータとしてサービスに送信する方法は? (サードパーティの JSON ライブラリを JSON.net として使用せずに)