diff --git a/src/aggregation/metric/average.rs b/src/aggregation/metric/average.rs index ed13c53fba..966ea10051 100644 --- a/src/aggregation/metric/average.rs +++ b/src/aggregation/metric/average.rs @@ -24,7 +24,7 @@ pub struct AverageAggregation { /// By default they will be ignored but it is also possible to treat them as if they had a /// value. Examples in JSON format: /// { "field": "my_numbers", "missing": "10.0" } - #[serde(skip_serializing_if = "Option::is_none", default)] + #[serde(default)] pub missing: Option, } diff --git a/src/aggregation/metric/count.rs b/src/aggregation/metric/count.rs index ca685d6670..bb298de8b7 100644 --- a/src/aggregation/metric/count.rs +++ b/src/aggregation/metric/count.rs @@ -24,7 +24,7 @@ pub struct CountAggregation { /// By default they will be ignored but it is also possible to treat them as if they had a /// value. Examples in JSON format: /// { "field": "my_numbers", "missing": "10.0" } - #[serde(skip_serializing_if = "Option::is_none", default)] + #[serde(default)] pub missing: Option, } diff --git a/src/aggregation/metric/max.rs b/src/aggregation/metric/max.rs index 674972f519..ec8a6c6088 100644 --- a/src/aggregation/metric/max.rs +++ b/src/aggregation/metric/max.rs @@ -24,7 +24,7 @@ pub struct MaxAggregation { /// By default they will be ignored but it is also possible to treat them as if they had a /// value. Examples in JSON format: /// { "field": "my_numbers", "missing": "10.0" } - #[serde(skip_serializing_if = "Option::is_none", default)] + #[serde(default)] pub missing: Option, } diff --git a/src/aggregation/metric/min.rs b/src/aggregation/metric/min.rs index 562e865d38..a1c4066df5 100644 --- a/src/aggregation/metric/min.rs +++ b/src/aggregation/metric/min.rs @@ -24,7 +24,7 @@ pub struct MinAggregation { /// By default they will be ignored but it is also possible to treat them as if they had a /// value. Examples in JSON format: /// { "field": "my_numbers", "missing": "10.0" } - #[serde(skip_serializing_if = "Option::is_none", default)] + #[serde(default)] pub missing: Option, } diff --git a/src/aggregation/metric/stats.rs b/src/aggregation/metric/stats.rs index 0432cd8e19..ac4aa5b728 100644 --- a/src/aggregation/metric/stats.rs +++ b/src/aggregation/metric/stats.rs @@ -33,7 +33,7 @@ pub struct StatsAggregation { /// By default they will be ignored but it is also possible to treat them as if they had a /// value. Examples in JSON format: /// { "field": "my_numbers", "missing": "10.0" } - #[serde(skip_serializing_if = "Option::is_none", default)] + #[serde(default)] pub missing: Option, } diff --git a/src/aggregation/metric/sum.rs b/src/aggregation/metric/sum.rs index f63c144be8..067350a17c 100644 --- a/src/aggregation/metric/sum.rs +++ b/src/aggregation/metric/sum.rs @@ -24,7 +24,7 @@ pub struct SumAggregation { /// By default they will be ignored but it is also possible to treat them as if they had a /// value. Examples in JSON format: /// { "field": "my_numbers", "missing": "10.0" } - #[serde(skip_serializing_if = "Option::is_none", default)] + #[serde(default)] pub missing: Option, }