我有一个json数据,其中有一个名为lastModifed包含时间的字段(以毫秒为单位).我想用json.UnMarshaller将该数据转换为 struct 类型.我已经用json文件映射了该字段.但这种转换似乎并不奏效.
即:
我的Json看起来是这样的:
{
"name" : "hello",
"lastModified" : 1438167001716
}
而struct看起来就像
type Model struct {
Name string `json:"name"`
Lastmodified time.Time `json:"lastModified"`
}
看起来没有正确转换时间.我怎么才能从那些米勒那里拿到时间呢?
System.currentTimeMillis();