play-json-alone
play-json-alone copied to clipboard
case class inside objects not resolved
Something is not good with the name scoping:
object Foo {
case class Bar(i: Int, s: String)
}
object Test {
val f: Format[Foo.Bar] = Json.format[Foo.Bar]
}
This fails with not found: value Bar
.
Luckily there is a workaround:
object Test {
import Foo.Bar
val f: Format[Bar] = Json.format[Bar]
}
Yes true... We prefer to keep the macro quite simple for now as you can define everything manually...
Pascal
On Tue, Jul 2, 2013 at 2:24 PM, Sciss [email protected] wrote:
Something is not good with the name scoping:
object Foo { case class Bar(i: Int, s: String) } object Test { val f: Format[Foo.Bar] = Json.format[Foo.Bar] }
This fails with not found: value Bar.
Luckily there is a workaround:
object Test { import Foo.Bar val f: Format[Bar] = Json.format[Bar] }
— Reply to this email directly or view it on GitHubhttps://github.com/mandubian/play-json-alone/issues/5 .