Skip to content

Commit

Permalink
Merge pull request #102 from arkedge/skip-display-info-serialize-if-none
Browse files Browse the repository at this point in the history
Skip display_info serialize if None for v2 JSON compatibility
  • Loading branch information
sksat authored Dec 5, 2024
2 parents 99f4988 + 9ee7960 commit 2595835
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tlmcmddb/src/tlm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ pub struct Field {
pub conversion_info: ConversionInfo,
/// GS SW などでテレメトリを表示するときの情報
#[serde(default)]
pub display_info: DisplayInfo,
#[serde(skip_serializing_if = "Option::is_none")] // serialize v2 compatible if None
pub display_info: Option<DisplayInfo>,
/// このフィールドの説明(衛星運用者向け)
pub description: String,
/// このフィールドの説明(衛星開発者向け)
Expand Down

0 comments on commit 2595835

Please sign in to comment.