Creates a new Reads, which first passes the input JSON to rb,
and then it executes this Reads on the pre-processed JSON
(if rb has successfully handled the input JSON).
Creates a new Reads, which first passes the input JSON to rb,
and then it executes this Reads on the pre-processed JSON
(if rb has successfully handled the input JSON).
Create a new Reads which maps the value produced by this Reads.
Create a new Reads which maps the value produced by this Reads.
The type of the value produced by the new Reads.
the function applied on the result of the current instance, if successful
Creates a new Reads, based on this one, which first executes this
Reads' logic then, if this Reads resulted in a JsError, runs
the second Reads on the JsValue.
Creates a new Reads, which first transforms the input JSON
using the given tranformer, and then it executes this Reads
on the pre-processed JSON.
Creates a new Reads, which first transforms the input JSON
using the given tranformer, and then it executes this Reads
on the pre-processed JSON.
Convert the JsValue into a A
Convert the JsValue into a A
Widen this Reads.
Widen this Reads.
import play.api.libs.json.Reads def simple(r: Reads[Dog]): Reads[Animal] = r.widen[Animal] def combine(dog: Reads[Dog], cat: Reads[Cat]): Reads[Animal] = dog.orElse(cat).orElse(Reads.failed[Animal]("Unsupported Animal"))
(Since version 2.7.0) Use composeWith
Deserializer for Float types.