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

fix missing play-json reference #72

Closed Rogach closed 4 years ago

Rogach commented 5 years ago

Without this change the following message is generated when using formatCaseClassUseDefaults:

not found: value JsSuccess
CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

pavelhlushchanka commented 5 years ago

ping @caente

Would be good if this can be released. Thanks!

gwak commented 4 years ago

While we wait for the PR to be merged, one can just import JsSuccess before the call to the macro:

object MyCaseClass {

  // Because the below Jsonx macro doesn't reference the full path of JsSuccess
  // We need to import JsSuccess until this PR is merged:
  // https://github.com/xdotai/play-json-extensions/pull/72
  import play.api.libs.json.JsSuccess

  implicit val jsonFormat = Jsonx.formatCaseClassUseDefaults[MyCaseClass]
}