Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

@JsonProperty("game_name"): 给字段起别名; @JsonInclude(JsonInclude.Include.NON_NULL): 字段如果空值,json中不返回

data class Game(val id:Int,
                @JsonProperty("wowo")
                @JsonInclude(JsonInclude.Include.NON_NULL)
                val name: String?){

[
  {
    "id": 1,
    "wowo": "csgo"
  },
  {
    "id": 2
  }
]