I think the suggestion for using jsonx is straight forward:
import ai.x.play.json.Encoders.encoder
import ai.x.play.json.Jsonx
Then:
implicit val yourObjectFormat: OFormat[YourObject] =
Jsonx.formatCaseClass[YourObject]
Credit:
Git: https://github.com/bizzabo/play-json-extensions