Repository navigation
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-text-json |
d95ce94 to
a28454e
Compare
|
Workflow state for the Holistic Review Orchestrator. {
"version": 5,
"last_dispatched_commit": "a28454e1a98e7b1665ff5a43b1145e9152ec887f",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "745263201eb2b63776fc54b08dcffb15423e40f8",
"last_reviewed_commit": "a28454e1a98e7b1665ff5a43b1145e9152ec887f",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "745263201eb2b63776fc54b08dcffb15423e40f8",
"last_recorded_worker_run_id": "29675336780",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "a28454e1a98e7b1665ff5a43b1145e9152ec887f",
"review_id": 4730519683
}
]
} |
There was a problem hiding this comment.
Holistic Review
Motivation: The XML documentation for JsonIgnoreCondition.WhenWritingNull stated the condition applies "only to reference-type properties and fields." This is inaccurate: WhenWritingNull also applies to Nullable<T> value-type members, which the PR author demonstrates with a DateTime? repro that serializes to {}.
Approach: A single-line comment change updates the summary text to "This is applied only to reference and nullable value-type properties and fields." No behavioral code is touched.
Summary: The correction accurately reflects runtime behavior. In JsonPropertyInfo, the WhenWritingNull handling is gated on PropertyTypeCanBeNull, which is true for both reference types and Nullable<T>, so null-valued nullable value-type members are indeed ignored under this condition. The wording is clear and grammatically correct. This is a low-risk, documentation-only improvement with no compatibility, performance, or test implications. LGTM.
Note: as the author mentions, equivalent conceptual documentation may also live in dotnet/docs; that is out of scope for this repository change.
Note
This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.
Generated by Holistic Review · 31.1 AIC · ⌖ 20 AIC · ⊞ 10K
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Doc only
It acutally applies to nullable value types too
Should I manually make PR to https://github.com/dotnet/docs ?