我们现在时候WINFORM 项目 查询的是网页内容 返回的是JSON 怎么解析? 有什么第三方组件没有?
解决方案 »
- Mono for Android for Visual Studio 2010
- winform,使用如下代码上传单个文件可以,如何同时上传多个文件呢?
- 利用 RAPI.DLL文件,如何从PDA机器上读取文件和从PC上把一个txt文件放到PDA上去..
- 求教:关于checkBox选中问题
- 请问,如何测试某台远程主机的3389端口(Remote Desktop)是否连得通?
- c# windows mobile 播放Wma
- VisualStudio使用问题
- 给定关键字不在字典中,ISessionFactory factory = cfg.BuildSessionFactory();
- 关于软件更新的问题
- TTCommand
- officecontrol.ocx 加盖公章doc文件可以,docx文件盖不上,怎么回事?
- wince 多语言 【求助】
if (EmployeeID == "") {
alert("编辑无效,NULL!");
return;
}
$.getJSON("/ajax/AA.ashx?time=" + Math.random(), { Action: "Get", ID: ID},
function(data) {
if (data != "") {
$(".IsMarry").val(data.IsMarry);
$(".Birthday").val(ChangeDateFormat(data.Birthday));
$(".IDCard").val(data.IDCard);
$(".BankCard").val(data.BankCard);
$(".BankId").val(data.BankId);
$(".EmpState").val(data.EmpState);
$(".ScheduleDesc").val(data.ScheduleDesc);
$(".DistrictDesc").val(data.DistrictDesc);
$(".LicenseType").val(data.LicenseType);
}
});
}
{
lock (SyncObject)
{
c = 0; if (text == null)
{
throw new FormatException();
} s = text.Trim();
if (s == string.Empty)
{
throw new FormatException();
}
#if !DEBUG
try
#endif
{
return ParseSomethingWithoutName();
}
#if !DEBUG
catch (Exception)
{
throw;
}
#endif
}
}
用着 个转换
UserInbox entity = JsonConvert.DeserializeObject<UserInbox>(data);//反序列化
string data=JsonConvert.SerializeObject(entity);//序列化
JObject oldAndBusted = new JObject();oldAndBusted["Name"] = "Arnie Admin";oldAndBusted["Enabled"] = true;oldAndBusted["Roles"] = new JArray(new[] { "Admin", "User" }); string oldRole = (string) oldAndBusted["Roles"][0];// Admin dynamic newHotness = new JObject();newHotness.Name = "Arnie Admin";newHotness.Enabled = true;newHotness.Roles = new JArray(new[] { "Admin", "User" }); string newRole = newHotness.Roles[0];
http://json.codeplex.com/releases/view/58535