Files
PSProxmoxVE/docs/decisions/0008-json-serialisation-is-newtonsoft-json-only.md
T
goodolclint-claude[bot] b90791e2bf docs: migrate DECISIONS.md to house-format ADRs, and retire the review folder (#131)
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.
2026-09-02 14:49:07 +00:00

1.3 KiB

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.

[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:

[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.