Sub-task of #83 (Newtonsoft.Json → System.Text.Json migration). Breaking change for downstream consumers.
Scope
Rewrite src/Fallout.Utilities.Text.Json to use System.Text.Json instead of Newtonsoft. This changes the public API surface of Fallout.Utilities.Text.Json — the consumer-facing extension methods currently return Newtonsoft JObject and accept Newtonsoft JsonSerializerSettings; they would return STJ JsonObject and accept JsonSerializerOptions instead.
Files to rewrite
JsonExtensions.cs — DefaultSerializerSettings → DefaultSerializerOptions; ToJson / GetJson / ReadJson / WriteJson / UpdateJson signatures updated; type aliases swap (JObject ↔ JsonObject)
JObject.GetChildren.cs → JsonObject.GetChildren.cs
JObject.GetPropertyValue.cs → JsonObject.GetPropertyValue.cs
Object.ToJObject.cs → Object.ToJsonNode.cs (or similar)
Base64JsonConverter.cs — internal JsonConvert.DeserializeObject<T> → JsonSerializer.Deserialize<T>
AllWritableContractResolver.cs — Newtonsoft-specific concept (DefaultContractResolver). May be deletable; if needed, replace with JsonTypeInfo modifier (STJ source-gen approach).
Blocks
Once STJ-3 lands, the following can be unblocked:
- STJ-4 (Fallout.Tooling migration — heavy user of utility-lib APIs)
- STJ-5 (Fallout.Tooling.Generator)
- Remaining utility-lib consumers from STJ-2
Acceptance
Notes
The earlier attempt at this (commit 7f6125, branch feature/migrate-to-system-text-json) showed 26 cascading compile errors in consumers. Each is mechanical to fix, but the work needs proper time-budget — see the scoping summary in PR #111 for the full assessment.
Sub-task of #83 (Newtonsoft.Json → System.Text.Json migration). Breaking change for downstream consumers.
Scope
Rewrite
src/Fallout.Utilities.Text.Jsonto useSystem.Text.Jsoninstead of Newtonsoft. This changes the public API surface ofFallout.Utilities.Text.Json— the consumer-facing extension methods currently return NewtonsoftJObjectand accept NewtonsoftJsonSerializerSettings; they would return STJJsonObjectand acceptJsonSerializerOptionsinstead.Files to rewrite
JsonExtensions.cs—DefaultSerializerSettings→DefaultSerializerOptions;ToJson/GetJson/ReadJson/WriteJson/UpdateJsonsignatures updated; type aliases swap (JObject ↔ JsonObject)JObject.GetChildren.cs→JsonObject.GetChildren.csJObject.GetPropertyValue.cs→JsonObject.GetPropertyValue.csObject.ToJObject.cs→Object.ToJsonNode.cs(or similar)Base64JsonConverter.cs— internalJsonConvert.DeserializeObject<T>→JsonSerializer.Deserialize<T>AllWritableContractResolver.cs— Newtonsoft-specific concept (DefaultContractResolver). May be deletable; if needed, replace withJsonTypeInfomodifier (STJ source-gen approach).Blocks
Once STJ-3 lands, the following can be unblocked:
Acceptance
Newtonsoft.JsonPackageReference removed fromFallout.Utilities.Text.Json.csprojNotes
The earlier attempt at this (commit
7f6125, branchfeature/migrate-to-system-text-json) showed 26 cascading compile errors in consumers. Each is mechanical to fix, but the work needs proper time-budget — see the scoping summary in PR #111 for the full assessment.