jquery 转换为 json

标签 jquery json

我有这样的数据:

ID=300573&CarNo=1&Account=AAAA&AccountingDate=3%2F21%2F2013&Description=NewCar&CheckAmount=666666&ClearedAmount=-3446.5&ClearedDate=4%2F9%2F2013&Sent=S&SentDate=4%2F4%2F2013&Hold=&HoldDate=&Notes=BBB

我从以下地方得到的:

$(this).parent().parent().find('input').serialize()

如何将其转换为 json?对于 ASP.NET API Controller ,它需要采用 json 格式

最佳答案

var serialize = $(this).parent().parent().find('input').serialize();

var JsonData = JSON.stringify(serialize);

关于jquery 转换为 json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43350953/

相关文章:

php - 显示图像并运行脚本十五秒

javascript - 当用户语言从英语变为希伯来语时如何更改字体系列

javascript - 如何在 JS 中判断某个函数/方法是否存在于 IE7 中?

php - 如何使用 PDO::FETCH_UNIQUE 将 json 转换为正确的格式?

java - 如何将平面 map 转换为复杂的 JSONObject?

java - JSON数据反序列化

python - 如何 append 到AWS S3上的json文件

javascript - 以编程方式将可滚动 div 滚动到其顶部

javascript - 在phonegap上使用afui和jquery时"Uncaught TypeError: Property ' touchLayer ' of object function ( selector, context )"

java - 错误 : 'ContentNegotiatingViewResolver' of Spring 3. 0.3 MVC Portlet+JSON