DynamicEntity

 1     class Program
 2     {
 3         static void Main(string[] args)
 4         {
 5             MetadataConfigurationManager.Config("");
 6             string json = "{\"ID\":\"000001\",\"Name\":\"order000001\",\"Details\":[{\"ID\":\"000001\",\"Name\":\"Apple\"},{\"ID\":\"000002\",\"Name\":\"Orange\"},{\"ID\":\"000003\",\"Name\":\"Beer\"}],\"CreateTime\":\"2013-02-01\"}";
 7             DynamicEntity de = DynamicEntityFormatter.Deserialize(json, "Order");
 8             json = DynamicEntityFormatter.Serialize(de);
 9             Console.WriteLine(json);
10             Console.Read();
11         }
12     }

download

posted @ 2013-02-01 15:50  Joe·Zhou  阅读(718)  评论(0编辑  收藏  举报