Javascript 400响应“;读取对象引用时出错";,由「$id";性质
我有一个简单的RESTful服务器,客户端使用Durandal。当我想更新一个对象,然后将其发送回服务器时,我收到一个400错误,抱怨读取对象引用和引用对象的Javascript 400响应“;读取对象引用时出错";,由「$id";性质,javascript,rest,knockout.js,reference,http-status-code-400,Javascript,Rest,Knockout.js,Reference,Http Status Code 400,我有一个简单的RESTful服务器,客户端使用Durandal。当我想更新一个对象,然后将其发送回服务器时,我收到一个400错误,抱怨读取对象引用和引用对象的$id属性时出现错误 所述对象的示例: { $id="1", //What is this doing here? Is being put there when I got the object from server to update it name="John", pet={ $id="1",
$id
属性时出现错误
所述对象的示例:
{
$id="1", //What is this doing here? Is being put there when I got the object from server to update it
name="John",
pet={
$id="1", //same as above
name="Jim",
type="dog"
}
删除这些道具时我没有得到400,但那只是丑陋和不必要的代码,对吗