BrpQueryRow has field deserialization fix (#16613)

# Objective

BrpQueryRow doesn't serialize `has` field if it is empty. That is okay
until you try to deserialize it after. Then it will fail to deserialize
due to missing field.

## Solution

Serde support using default value when field is missing, this PR adds
that.
This commit is contained in:
MevLyshkin 2024-12-04 19:26:33 +01:00 committed by GitHub
parent 7dfc77b999
commit f59ae0f5e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -304,7 +304,7 @@ pub struct BrpQueryRow {
pub components: HashMap<String, Value>, pub components: HashMap<String, Value>,
/// The boolean-only containment query results. /// The boolean-only containment query results.
#[serde(skip_serializing_if = "HashMap::is_empty")] #[serde(skip_serializing_if = "HashMap::is_empty", default)]
pub has: HashMap<String, Value>, pub has: HashMap<String, Value>,
} }