The Json Macro Inception is not a good choice here, because this case is too complex. It only supports classic case, you cannot map
values for exemple.
In this situation, you need a specific formater
import play.api.libs.json._
import play.api.libs.functional.syntax._
import anorm._
implicit val playerFormat = (
(__ \ "id").formatNullable[Long] and
(__ \ "name").formatNullable[String] and
(__ \ "group" \ "id").format[Long]
)((id, name, group) => Player(id.map(Id(_)).getOrElse(NotAssigned), name, group),
(p: Player) => (p.playerId.toOption, p.name, p.groupId))
It's a little bit complex, as your requirements are ;)