Play JSON Version (2.5.x / etc)
all
API (Scala / Java / Neither / Both)
scala
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
all
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
all
Expected Behavior
Format has bimap method. But I think we should add more methods. e.g.
def bimapJsResult[B](readsMap: A => JsResult[B], writesContramap: B => A): Format[B] =
|
def bimap[B](readsMap: A => B, writesContramap: B => A): Format[B] = |
|
Format[B](map(readsMap), contramap(writesContramap).writes(_)) |
https://github.com/circe/circe/blob/f7380ca5516bb80e2a0a8da85e2d30fad6a344f1/modules/core/shared/src/main/scala/io/circe/Codec.scala#L35-L51
Play JSON Version (2.5.x / etc)
all
API (Scala / Java / Neither / Both)
scala
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
all
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
all
Expected Behavior
Formathasbimapmethod. But I think we should add more methods. e.g.play-json/play-json/shared/src/main/scala/play/api/libs/json/Format.scala
Lines 22 to 23 in 3c047f2
https://github.com/circe/circe/blob/f7380ca5516bb80e2a0a8da85e2d30fad6a344f1/modules/core/shared/src/main/scala/io/circe/Codec.scala#L35-L51