play-json-extensions icon indicating copy to clipboard operation
play-json-extensions copied to clipboard

Not working after 0.40.2 update

Open leangl opened this issue 6 years ago • 2 comments

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]

}

leangl avatar Jul 04 '19 15:07 leangl

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

osbornk avatar Aug 29 '19 23:08 osbornk

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

pavelhlushchanka avatar Oct 11 '19 12:10 pavelhlushchanka