scala - Play json merge formats for case class with more than 22 fields -
i trying split format multiple tuples can handle more 22 fields in case class. however, got error "value , not member of play.api.libs.json.format". how can merge multiple formats case class?
val fields1to2: format[(int, string)] = ( (__ \ "a").format[int] , (__ \ "b").format[string] ).tupled val fields3to4: format[(boolean, list[int])] = ( (__ \ "c").format[boolean] , (__ \ "d").format[list[int]] ).tupled implicit val hugecaseclassreads: format[huge] = ( fields1to2 , fields3to4 // "value , not member of play.api.libs.json.format" ) { case ((a, b), (c, d)) => huge(a, b, c, d) }
Comments
Post a Comment