scala - Play Json: Transforming a Reads[T] to Reads[Seq[T]] without implicits -


i hava reads[t]. parse json object expected array of t's. there simple way obtain reads[seq[t]] without defining reads[t] implicit? essentially, looking function takes reads[t] , returns reads[seq[t]].

i came across reads.traversablereads, , thought can pass implicit reader needs explicitly, function wants canbuildform[...], not sound fun.

there method in reads companion object: reads.seq. parameter implicit, can call explicitly if want:

val a: reads[t] = ... val b: reads[seq[t]] = reads.seq(a) 

Comments