Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
camelCase Json格式化程序在网站中全局配置不受尊重_Json_Vb.net_Web - Fatal编程技术网

camelCase Json格式化程序在网站中全局配置不受尊重

camelCase Json格式化程序在网站中全局配置不受尊重,json,vb.net,web,Json,Vb.net,Web,我已尝试在我的网站的应用程序\u Start中设置此选项: GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ContractResolver = New CamelCasePropertyNamesContractResolver() 但是,当我从angular POST AJAX请求中得到回调时(该请求转到该页面代码后面的WebMethod),它仍然以原始默认格式返回Json数据(Ti

我已尝试在我的网站的
应用程序\u Start
中设置此选项:

GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ContractResolver = New CamelCasePropertyNamesContractResolver()
但是,当我从angular POST AJAX请求中得到回调时(该请求转到该页面代码后面的WebMethod),它仍然以原始默认格式返回Json数据(TitleCase)

我在app start中注意到的一点是,在将契约解析器更改为
camelcasepropertynamescontractcolver
后,它确实显示为设置为camelcase版本,但
defaultcontractcolver
仍然存在于
实例中

编辑: 我猜这是因为这是一个Asp.Net网站,而不是一个不起作用的web应用程序

输出显示,
System.Web.Script.Serialization.JavaScriptSerializer
执行转换,并读取无法访问/更改的内容。有人有进一步的线索吗