in src/main/scala/com/googlesource/gerrit/plugins/support/GerritSupportCommands.scala [55:59]
implicit def convertAny2CommandResult(x: Any)(implicit resultName: ResultName, gson: Gson): CommandResult =
x match {
case res: AnyResult => CommandResult(resultName, res)
case anyRes => CommandResult(resultName, JsonResult(gson.toJsonTree(anyRes)))
}