无法使用读取读取json

时间:2018-06-23 22:53:01

标签: playframework-2.6

我有一个fsetequal(funRcppAlgos(d), funGRbase(d)) [1] TRUE -json

某些字段是字符串,其他字段是数组。

创建

的逻辑
{"data":{"field1":"d","field2":["d"],"field3":["d"],"field4":"d","field5":["d"],"field6":"d","field7":"d"}}

但是,当我 implicit val myDataReads:Reads[MyData] = ( (JsPath \ "data").read[Data] ).map((x:Data)=>Data.apply (x)) implicit val dataReads:Reads[Data] = ( (JsPath \ "field0").readNullable[UUID] and (JsPath \ "field1").read[String] and (JsPath \ "field2").read[List[String]] and (JsPath \ "field3").read[Seq[Byte]] and (JsPath \ "field4").read[String] and (JsPath \ "field5").read[Set[String]] and (JsPath \ "field6").read[String] and (JsPath \ "field7").read[String] )(Data.apply _) 时得到None

我在做什么错了?

0 个答案:

没有答案