mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-04 03:05:32 +00:00
b90791e2bf
D001-D021 become ADR 0001-0021 in docs/decisions/, one decision per file. D017's PESTER_VERSION amendment was a second decision in one entry and becomes ADR 0022. ADR 0023 records the migration and reverses the lane2-change-plan ruling that deliberately kept DECISIONS.md until the CI lane work landed. DECISIONS.md is reduced to a stub with a D-to-ADR redirect table, so the four released CHANGELOG entries and older issue bodies that cite it degrade to a redirect rather than a dead reference. docs/review/ and docs/lane2-change-plan.md are deleted (ADR 0024). Of 91 findings, 83 were resolved and six of the seven still open were already GitHub issues; F021 was the exception and is now #130. CLAUDE.md's Key Conventions list gains the two rules it was missing and becomes the checklist, with the ADRs carrying rationale.
36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# ADR 0008 — JSON serialisation is Newtonsoft.Json only
|
|
|
|
- **Status:** Accepted
|
|
- **Date:** 2026-03-22
|
|
- **Deciders:** unrecorded; adopted during review scan 2026-03-22
|
|
- **Context source:** `docs/review/findings.json` F044
|
|
|
|
## Context
|
|
|
|
Model classes carried both `[JsonProperty]` (Newtonsoft) and `[JsonPropertyName]` (System.Text.Json) attributes. Only Newtonsoft runs at runtime, so the second set was inert — but a reader could not tell which one the deserialiser honoured, and changing one without the other would look correct and do nothing.
|
|
|
|
## Decision
|
|
|
|
Newtonsoft.Json is the only JSON library. Model classes carry `[JsonProperty]` and nothing else.
|
|
|
|
```csharp
|
|
[JsonProperty("status")]
|
|
public string Status { get; set; }
|
|
```
|
|
|
|
## Rejected alternatives
|
|
|
|
Carrying both attribute sets so a future migration to System.Text.Json is already half-done:
|
|
|
|
```csharp
|
|
[JsonProperty("status")]
|
|
[JsonPropertyName("status")]
|
|
public string Status { get; set; }
|
|
```
|
|
|
|
Rejected because the unused set is never exercised, so it rots silently, and it makes every property read as though two serialisers are in play.
|
|
|
|
## Consequences
|
|
|
|
All `[JsonPropertyName]` attributes were removed. A `System.Text.Json` package reference survived the removal for the netstandard2.0 and net48 targets with no source using it — an unused dependency on the published surface, filed separately.
|