In Scala 2.10 apparently we're getting improved reflection.
How will this impact lift-json, jerkson, sjson and friends? Furthermore, can we expect in the not too distant future a built-in JSON language feature a la Groovy's excellent GSON in Scala?
The reason I ask is that I would dearly love to do:
case class Foo(a: String, b: Int, bar: Bar)
case class Bar(c: Int)
val foo = Foo("hey", 10, Bar(23))
val json = foo.toJson
without hoop jumping (i.e. boilerplate-ish prep work), even with arbitrarily complex object graphs. Perhaps I'm asking way too much, but one can always dream. Please shatter my 2.10 dreams or enlighten me as to what new avenues are opening with the highly anticipated release of Scala.Next
Also, in regard to case classes, it seems for validation/creation, scalaz validation is the go-to weapon of choice. It seems quite wonderful, acting as a safe proxy for object creation or as an error collector. As a Scewbie, however, I find scalaz somewhat challenging, and am resisting the F-ing dark side despite its obvious power ;-)
At any rate, the point here is, with 2.10 reflection we should be able to bind at runtime the fields from say, a form post, to the properties of a case class and perform basic validation based on property type alone (i.e. will not have to specify separate validation logic that specifies property foo must be a String since its type is already defined in the case class upon which we can now properly reflect)
So, brave new world cometh, or existing tools are the mainstay for the foreseeable future?