Web服务(.asmx)中的Json参数 [英] Json parameter in web service (.asmx)

查看:411
本文介绍了Web服务(.asmx)中的Json参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

Web服务中是否可以接受JSON作为参数?
我如何找到任何示例链接?
非常感谢您的帮助

最佳Rgds,
dartfrog

解决方案

Asmx服务不适用于json.如果要使用不启用json的wcf服务启用asmx来进行类似的操作,则将json编码为get或post参数,然后将其反序列化以自己反对服务背后的代码.

但是,我建议您只将wcf服务用于该插件.


看这里: 解决方案

Asmx services dont work with json. If you want to make something like this with asmx not json enabled wcf service then encode your json as get or post parameter and deserialize it by yourself to object in code behind of service.

However I recomend to you just use it wcf service for that insted.


Look here: Prepare a JSON Web Service and access it with JQuery[^]


这篇关于Web服务(.asmx)中的Json参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆