Skip to content

Commit f59ae0f

Browse files
authored
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.
1 parent 7dfc77b commit f59ae0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_remote/src/builtin_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pub struct BrpQueryRow {
304304
pub components: HashMap<String, Value>,
305305

306306
/// The boolean-only containment query results.
307-
#[serde(skip_serializing_if = "HashMap::is_empty")]
307+
#[serde(skip_serializing_if = "HashMap::is_empty", default)]
308308
pub has: HashMap<String, Value>,
309309
}
310310

0 commit comments

Comments
 (0)