单项选择题
反序列化函数
T deserialize(String s)
{
DataContractJsonSerializer json = new DataContractJsonSerializer(typeof(T));
byte[] buf = Encoding.UTF8.GetBytes(s);
MemoryStream ms = new MemoryStream(buf);
T obj = (T)json.ReadObject(ms);
return obj;
}
A、正确
B、错误
{
DataContractJsonSerializer json = new DataContractJsonSerializer(typeof(T));
byte[] buf = Encoding.UTF8.GetBytes(s);
MemoryStream ms = new MemoryStream(buf);
T obj = (T)json.ReadObject(ms);
return obj;
}
A、正确
B、错误
点击查看答案&解析
相关考题
