Skip serialization for empty fields

This commit is contained in:
clerie 2024-08-24 19:06:22 +02:00
parent 1b2a8793e6
commit 559869c2b8

View File

@ -42,8 +42,11 @@ struct Cli {
#[derive(Serialize)]
struct MessageMap {
#[serde(skip_serializing_if = "Option::is_none")]
server_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
domain_name_servers: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
domain_search_list: Option<Vec<String>>,
}