摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using Newtonsoft.Json;namespace Xys.PetShop.Web{ public class Cookie<T> { public static void SetCookie(string name, T tValue, DateTime expires) { string value=JsonConvert.SerializeObject(tValue); HttpCookie cookie 阅读全文
posted @ 2012-03-02 15:04 虎头 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 主页:http://json.codeplex.com/NuGet安装:http://nuget.org/packages/Newtonsoft.JsonPM> Install-Package Newtonsoft.Json类到json字符串的相互转换public class Product{ public string Name{get;set;} public DateTime Expiry{get;set;} public decimal Price{get;set;} public string[]... 阅读全文
posted @ 2012-03-02 15:00 虎头 阅读(2443) 评论(0) 推荐(0) 编辑