@JsonProperty("game_name"): 给字段起别名; @JsonInclude(JsonInclude.Include.NON_NULL): 字段如果空值,json中不返回
@JsonProperty("game_name")
@JsonInclude(JsonInclude.Include.NON_NULL)
data class Game(val id:Int, @JsonProperty("wowo") @JsonInclude(JsonInclude.Include.NON_NULL) val name: String?){
[ { "id": 1, "wowo": "csgo" }, { "id": 2 } ]
最后更新于4年前