System.Text.Json で、null 値のプロパティはJSONに出力したくないという状況のときは、 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] を使うと良いということを知りました。
詳細は公式ドキュメントを参照ください。
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 1 year has passed since last update.
System.Text.Json で、null 値のプロパティはJSONに出力したくないという状況のときは、 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] を使うと良いということを知りました。
詳細は公式ドキュメントを参照ください。
Register as a new user and use Qiita more conveniently
Go to list of users who liked