override def reads()

in client-play-json-v30/src/main/scala/com/gu/targeting/client/Fields.scala [65:75]


    override def reads(json: JsValue): JsResult[Fields] = {
      (json \ reservedTypeField).get match {
        case JsString(`emailType`) => emailFormat.reads(json)
        case JsString(`badgeType`) => badgeFormat.reads(json)
        case JsString(`epicType`) => epicFormat.reads(json)
        case JsString(`reportType`) => reportFormat.reads(json)
        case JsString(`surveyType`) => surveyFormat.reads(json)
        case JsString(`participationType`) => participationFormat.reads(json)
        case other => JsError(s"Unexpected step type value: $other")
      }
    }