我想JSON隐含读取使用硬编码值,是这样的:JSON在播放框架(斯卡拉)硬编码值读取
implicit val locationReads: Reads[Location] = (
"I am a hardcoded value" and // something like that
(JsPath \ "lat").read[Double] and
(JsPath \ "long").read[Double]
)(Location.apply _)
有谁知道如何做到这一点?
哇,我不知道,太棒了! – kosii