Play uses it specifically for in it’s JSON module; you can define readers and writers that allow you to parse the structure of a JSON object. To avoid having to be very explicit, you can define a case class that directly mirrors the structure of that object. e.g.
given some case class that looks like this:
case class SomeObj(someInt: Int)
you could do:
val theObj = SomeObj((json \ “someInt”).as[Int])
or
implicit val reads: Reads[SomeObj] = ((json \ “someInt”).read[Int])(SomeObj.apply _)
with reflection, you get:
implicit reads: Reads[SomeObj]
val theObj = reads.validate(json)
Seems trivial with this small example but with large objects it keeps your code much more maintainable and consistent since reading and writing from that case class is the same.
As far as it not working in Scala.js, from my understanding it has to do with how the reflection library is shared between both runtime and compile time implementations.
You can read more about it here: http://docs.scala-lang.org/overviews/reflection/overview.htm...