我有scala Play应用程序,我想做这样的事情:
implicit val ProcessStepsFormat: OFormat[ProcessSteps] = Json.format[ProcessSteps]
case class ProcessSteps(stepsData: Seq[Option[ProcessStepTemplatesModel]])
问题是我收到了这个错误:
No implicit format for Seq[Option[models.ProcessStepTemplatesModel]] available.
如何更改它的工作格式?
非常感谢
更新
case class ProcessStepTemplatesModel(
id: Option[Int],
title: String,
createdat: String,
updatedat: String,
deadline: Option[Date],
comment: Option[String],
stepType: Int,
deleted: Boolean,
processtemplate: Option[Int],
derivedProcesses: Seq[ProcessStepTemplatesDerivedProcessesModel],
prerequisites: Seq[ProcessStepPrerequisitesModel],
postconditions: Seq[ProcessStepPostconditionModel],
addProcessToProcessStepArray: Seq[ProcessStepsTemplates_ProcessTemplatesModel])
object ProcessStepTemplatesModel {
implicit val processStepFormat = Json.format[ProcessStepTemplatesModel]
}
答案 0 :(得分:1)
您是否为ProcessStepTemplatesModel
声明了隐式格式?