0
我有下面的代碼,並得到Json.parse
說編譯時錯誤cannot resolve symbol parse
。我正在傳遞String
類型的eventData
,而parse()
需要一個字符串,那爲什麼它不起作用?Json play libs parse()無法解析簡單解析
override def recordEvent(customerId: String, eventType: String, eventData: String, eventMetadata: String, profileUpdate: ProfileUpdate): Future[AvroCustomer] = {
val id = UUID.fromString(customerId)
val updates: Option[ProfileUpdateData] = Option(profileUpdate).map(parseUpdates)
val eventData = Json.parse(eventData)
}