@JsonInclude(Include.NON_NULL)
时间: 2023-10-22 22:08:13 浏览: 153
@JsonInclude(JsonInclude.Include.NON_NULL)是一个注解,用于在JSON序列化过程中指定是否包含值为null的属性。当属性的值为null时,如果使用了该注解并设置为Include.NON_NULL,则该属性将被排除在序列化结果之外。这样可以减少序列化后的JSON数据的大小,并且可以提高网络传输效率。该注解可以应用于类、字段或方法上,以指定对应的属性是否包含null值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [@JsonInclude(JsonInclude.Include.NON_NULL)注解](https://blog.csdn.net/a24b86/article/details/121849009)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [关于使用@JsonInclude(JsonInclude.Include.NON_NULL)标签去除json数据中的空值问题](https://blog.csdn.net/qq_31404603/article/details/88560166)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文