通过WCF自定义发送JSON [英] Sending JSON thru WCF Custom

查看:63
本文介绍了通过WCF自定义发送JSON的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用接受JSON的REST服务。我正在尝试通过WCF自定义适配器POST JSON,详见REST工具包。但是我得到以下内容是的.WCF无法发布JSON。它只能发布XML

I am trying to consume REST service which accepts JSON.I am trying to POST JSON thru WCF Custom Adapter as detailed in REST toolkit.However i am getting the following error.Is it true that WCF cannot post JSON.It can only post XML

chirag

推荐答案

偏离主题:我也对这样的错误文本感到沮丧。为什么第1行中的错误数据,位置1不在错误中?它应该是这样的: 

Off topic: I also frustrated by such error text. Why this wrong data in line 1, position 1 is NOT in the error?????? It should be like this: 

System.Xml.XmlException:根级别的数据无效('<')。第1行,位置
1。

我知道这是一个安全问题,但仍然不满意。

I understand it is a security concern, but still unhappy.


这篇关于通过WCF自定义发送JSON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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