Skip to content

[STJ-4] Migrate Fallout.Tooling JSON serialization (blocked on STJ-3) #117

Description

@ChrisonSimtian

Sub-task of #83 (Newtonsoft.Json → System.Text.Json migration). Blocked on STJ-3 (utility-lib rewrite).

Scope

Migrate Fallout.Tooling's JSON serialization machinery from Newtonsoft to System.Text.Json. This is the layer that handles tool-options ↔ command-line arguments and tool-options ↔ JSON files, used by every generated tool wrapper.

Files (≈7)

  • src/Fallout.Tooling/Options.cs — main option-set abstraction with JsonConvert-based round-tripping
  • src/Fallout.Tooling/Options.Modify.cs
  • src/Fallout.Tooling/ObjectFromFieldConverter.cs — custom Newtonsoft JsonConverter that has no direct STJ equivalent; needs rewrite as JsonConverter<T> in the STJ shape
  • src/Fallout.Tooling/ToolOptions.Arguments.cs
  • src/Fallout.Tooling/ToolOptions.Secrets.cs
  • src/Fallout.Tooling/NpmVersionResolver.cs
  • src/Fallout.Tooling/NuGetVersionResolver.cs
  • src/Fallout.Tooling/NuGetPackageResolver.cs
  • src/Fallout.Tooling/ProcessExtensions.cs
  • Plus test file tests/Fallout.Tooling.Tests/OptionsTest.cs which has Newtonsoft-typed assertions

Risk

This affects how every tool wrapper serializes its options. Subtle differences between Newtonsoft and STJ (default property naming, null handling, enum serialization, etc.) can produce wrong CLI args at runtime. Heavy testing required.

Acceptance

  • All listed files migrated
  • All 62 tool-wrapper integration paths still produce identical CLI args (compare before/after via a representative test set)
  • Newtonsoft.Json PackageReference removed from Fallout.Tooling.csproj
  • ./build.ps1 Test green

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions