I'm not able to get the following to work, so don't know if it's even possible:
case class ItemA(name:String,itemB:ItemB)
case class ItemB(name:String)
object ToJson{
implicit val itemAJson = Json.format[ItemA]
implicit val itemBJson = Json.format[ItemB]
}
I get a compile error of something like:
No implicit format for ItemB available. [error] implicit val itemAJson = Json.format[ItemA]
Pretty sure it can't be done, but is there a sensible approach to take?
Play Framework 2.3