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

Generate a reads of a case class #87

Open leo-dur opened 3 years ago

leo-dur commented 3 years ago

Is there a way to generate only a reads and not a format for a case class?

implicit val barReads: Reads[Bar] = ???

case class Foo(bar: Bar)

implicit val format = Jsonx.formatCaseClass[Foo] // doesn't compile as Write[Bar] is not available

// ideally I would like to have something like
implicit val read = Jsonx.readCaseClass[Foo]
gaeljw commented 2 years ago

Same would be nice for only a Writes