bizzabo / play-json-extensions

+22 field case class formatter and more for play-json
http://cvogt.org/play-json-extensions/api/
Other
196 stars 44 forks source link

Not working after 0.40.2 update #73

Open leangl opened 5 years ago

leangl commented 5 years ago

After upgrading to 0.40.2 it stopped working. I'm using Play 2.7.3. Version 0.30.1 worked just fine.

This is the error I get:

Image.scala:13:81: not found: value JsSuccess [error] implicit lazy val jsonFormat: OFormat[Image] = Jsonx.formatCaseClassUseDefaults[Image]

case class Image(url: String,
                 size: Option[Size] = None,
                 owned: Boolean = false,
                 thumbnails: List[Image] = List())

object Image {

  implicit lazy val jsonFormat: OFormat[Image] = Jsonx.formatCaseClassUseDefaults[Image]

}

case class Size(width: Int,
                height: Int)

object Size {

  implicit lazy val jsonFormat: OFormat[Size] = Jsonx.formatCaseClassUseDefaults[Size]

}
osbornk commented 5 years ago

I am getting this issue as well. If there is something else we need to add, it is unclear.

pavelhlushchanka commented 4 years ago

add import play.api.libs.json.JsSuccess as a workaround there is pr for that https://github.com/xdotai/play-json-extensions/pull/72