こんにちは、私は FlexJson と emberjs の両方にかなり慣れていません。
ember ガイドによると、ember には次の形式の json が必要です。
{
"post": {
"comments": [1, 2, 3]
}
}
特定のモデルに以下を使用しています。
public static JSONSerializer licence = new JSONSerializer()
.exclude("class")
.exclude("persistent")
.exclude("entityId")
.rootName("licence")
.include("licenceFeatures.id")
.exclude("licenceFeatures.*");
そして、私は次の出力を得ています:
{
"licence": {
"id": 1,
"licenceDescription": "GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license.",
"licenceFeatures": [
{
"id": 15
},
{
"id": 3
}
],
"licenceName": "GNU General Public License (GPL) 2.0",
"licenceURL": "http://opensource.org/licenses/GPL-2.0"
}
}
ember が期待する形式で「licenceFeatures」配列をフォーマットするにはどうすればよいですか?