0
什麼是使用多個FieldSerializer的正確語法?我試圖重新命名3場只工作,如果我使用Concat的DefaultFormatsjson4s - 如何使用多個FieldSerializer
val currg = FieldSerializer[Currency](renameTo("gameCurr", "gameCurr"), renameFrom("currg", "gameCurr"))
val curre = FieldSerializer[Currency](renameTo("currency", "currency"), renameFrom("curre", "currency"))
val lprice = FieldSerializer[Currency](renameTo("price", "price"), renameFrom("lprice", "price"))
implicit val formats = org.json4s.DefaultFormats + lprice //+ curre + currg
其中之一。如果我只讓一個FieldSerializer,它就像一個魅力
implicit val formats = org.json4s.DefaultFormats + lprice