日期:2014-05-17 浏览次数:20442 次
DataContractJsonSerializer json = new DataContractJsonSerializer(list.GetType());
using (MemoryStream stream = new MemoryStream())
{
json.WriteObject(stream, list);
string szJson = Encoding.UTF8.GetString(stream.ToArray());
return szJson;
}
//post返回的json数据
function (data) {
var json = eval(data);
var str = "";
for (var i = 0; i < json.length; i++) {
str += json[i].SName+ "-" + json[i].SAge+json[i].SSex;
str += "\r\n";
&nb