Microsoft JScript运行时错误:不支持value参数中的循环引用 [英] Microsoft JScript runtime error: Circular reference in value argument not supported

查看:407
本文介绍了Microsoft JScript运行时错误:不支持value参数中的循环引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在我的网络应用程序中,我收到类似Microsoft JScript运行时错误的错误:不支持值参数中的循环引用。这是我的代码:< br $> b $ b





 self。更新 = 功能(实体){

$ .ajax({
url:' / api / dtapi / Job'
cache:false,
type: PUT'
contentType:' < span class =code-string> application / json; charset = utf-8',
data:ko.toJSON(Entity),
success:功能(数据){

if (data!= null ){
alert(' updated');

}
else {
alert(' 未更新');

}
}

})
}







请帮我找到解决方案。

解决方案

.ajax({
url:' / api / dtapi / Job'
cache:false,
type:' PUT'
contentType:' application / json; charset = utf-8'
data:ko.toJSON(Entity),
success: function (data){

if (data!= null ){
alert(' updated');

}
其他 {
alert(' not updated');

}
}

})
}







请帮我找到解决方案。


你应该将子实体和导航实体置空,然后将数据发送到Web Api服务。例如

data.Person = null;

data.Categories = null;



电子邮件:dp290888@yahoo.com

hi all,

In my web application i am getting error like Microsoft JScript runtime error: Circular reference in value argument not supported.here is my code:



self.Update = function (Entity) {

       $.ajax({
           url: '/api/dtapi/Job',
           cache: false,
           type: 'PUT',
           contentType: 'application/json; charset=utf-8',
           data: ko.toJSON(Entity),
           success: function (data) {

               if (data != null) {
         alert('updated');

               }
               else {
       alert('not updated');

               }
           }

       })
   }




please help me to findout solution.

解决方案

.ajax({ url: '/api/dtapi/Job', cache: false, type: 'PUT', contentType: 'application/json; charset=utf-8', data: ko.toJSON(Entity), success: function (data) { if (data != null) { alert('updated'); } else { alert('not updated'); } } }) }




please help me to findout solution.


You should null sub entity and navigation entity so then send data to Web Api service.for example
data.Person = null;
data.Categories = null;

Email: dp290888@yahoo.com


这篇关于Microsoft JScript运行时错误:不支持value参数中的循环引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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