Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip display_info serialize if None for v2 JSON compatibility #102

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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