【发布时间】:2016-03-10 16:45:04
【问题描述】:
我正在尝试使用第三方 API 的特定格式读取 json 对象中的日期,为简单起见,我将尽我所能。这是日期
"date_created" -> "Mon, 19 Oct 2015 07:07:03 +0000",
我正在尝试将 json 解析为这样的自定义对象
(JsPath \ "date_created").read[SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US)].map{ response => new com.github.nscala_time.time.Imports.DateTime(response) } and
不工作,但有没有办法让它工作?
谢谢
【问题讨论】:
标签: json scala nscala-time