Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.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
Ember.js ember data 1.0 json结构_Ember.js_Ember Data - Fatal编程技术网

Ember.js ember data 1.0 json结构

Ember.js ember data 1.0 json结构,ember.js,ember-data,Ember.js,Ember Data,对于ember data()的所有更改,我很难确定json格式是否也发生了更改 例如,如果我有以下模型 App.Contact = DS.Model.extend({ contactGroupGUID: DS.attr('string'), email: DS.attr('string'), firstName: DS.attr('string'), id: DS.attr('string'), lastName: DS.attr('string'),

对于ember data()的所有更改,我很难确定json格式是否也发生了更改

例如,如果我有以下模型

App.Contact  = DS.Model.extend({
    contactGroupGUID: DS.attr('string'),
    email: DS.attr('string'),
    firstName: DS.attr('string'),
    id: DS.attr('string'),
    lastName: DS.attr('string'),
    notes: DS.attr('string')
})    
contactGroupGUID、firstName和lastName的json字段名是什么

还是姓还是名?(我从未想过contactGroupGUID应该是什么;))


谢谢

Ember Data 1.0.beta.1对JSON有效负载中的键没有任何作用。默认情况下,带下划线的属性不再为大小写。此外,相关模型id参考不再具有
\u id
\u id
后缀。因此,如果您在0.13中通过了以下测试:

{ post: {
  { title: "The future is now",
    extended_title: "The future is now: be prepared",
    author_id: 17,
    comment_ids: [7165, 8937, 9384]
  }
}
1.0.beta.1预期:

{ post: {
  { title: "The future is now",
    extendedTitle: "The future is now: be prepared",
    author: 17,
    comment: [7165, 8937, 9384]
  }
}
可以配置钥匙转换(c.f.),并且将来可能会有更多配置选项,例如,在何处查找相关型号