我正在尝试反序列化一个json,它作为长类型发送时间戳。我的覆盖层看起来是这样的: public final native Long getTimestamp() /*-{ return this.timestamp; }-*/;这似乎是可行的--当我使用getter打印控制台时,我得到了长值ok。我正在尝试将它传递到一个日期实例中,以进行格式化:Date date = new Date(item.getTimestamp())
以下代码输出以下结果:print('type of firstValue: ${firstValue.runtimeType}'); // double
print('type of secondValue: ${secondValue.runtimeType}'); // int
print('type of secondValue parsed: ${secondValue.toDouble().runtimeType}'); // int