1
對不起,我的英語不好。如何在rails上創建根json?
我想找到同樣的問題我的問題。我的問題是json不是根。
這是我的JSON數據:
[
{
created_at: "2013-07-26T02:49:55Z",
description: "hgfhgfhf",
iconapp: null,
id: 13,
name: "test1",
updated_at: "2013-07-26T02:49:55Z",
},
{
created_at: "2013-07-26T02:54:40Z",
description: "sadsadas",
iconapp: null,
id: 14,
name: "asdadas",
updated_at: "2013-07-26T02:54:40Z",
}
]
,但我想我的JSON數據有這樣的根元素:
- Apps: [
{
created_at: "2013-07-26T02:49:55Z",
description: "hgfhgfhf",
iconapp: null,
id: 13,
name: "test1",
updated_at: "2013-07-26T02:49:55Z",
},
{
created_at: "2013-07-26T02:54:40Z",
description: "sadsadas",
iconapp: null,
id: 14,
name: "asdadas",
updated_at: "2013-07-26T02:54:40Z",
}
]
Json的根源是 「應用程序」。怎麼辦?
請幫幫我嗎?
cooooooool非常感謝你 – Bustex