Skip serialization for empty fields
This commit is contained in:
parent
1b2a8793e6
commit
559869c2b8
@ -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>>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user