1
有沒有任何方法將從服務器接收的對象作爲JSON映射到CoffeeScript中的類實例?將CoffeeScript地圖對象映射到類實例
我有很多情況下,在我的JSON是:
{
id: '123'
name: 'wojtek'
age: 24
}
和我的咖啡類:
class Person
constructor: (id, name, age) ->
如何直接映射到JSON類的實例,而無需單獨分配每個屬性?
OMG,這是..真棒! – squixy