Split structured scanning into RedactWire.Structured add-on#2
Merged
Conversation
Core RedactWire no longer depends on System.Text.Json — it pulled STJ transitively for exactly one path (structured scanning), forcing every string-only consumer onto STJ 10.x. Pre-1.0, so the breaking move is cheap now. - New package src/RedactWire.Structured (netstandard2.0): JSON/XML/object scanners + StructuredPiiMatch moved here, namespace RedactWire kept so detector.DetectX(...) extension methods still resolve with just an added package reference. References core + System.Text.Json. Version 0.3.0 (tracks core). - Core: removed the System.Text.Json PackageReference (only dep now is DI.Abstractions) and the 3 Redactor.DetectJson/Xml/Object static forwarders. BREAKING: structured users call Redactor.Default.DetectJson(...) or detector.DetectX. - Tests: structured tests moved to tests/RedactWire.Structured.Tests (references the add-on); core test project stays STJ-free. 281 total green (259 core + 22 structured). - Solution, release workflow (packs both), README/nuget.md/CLAUDE.md updated. No detection-behavior or moved-signature changes — packaging move only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ture - /StructuredJson and /StructuredXml pages (was one combined page), each with its own sample and a culture selector. Sample references the RedactWire.Structured add-on. - Fix noisy output: the DI detector has every built-in pack, so scanning structured data with no culture surfaced a generic 4-digit postcode/phone hit per country (67 matches on the sample JSON). Pages now pass the chosen culture to DetectJson/DetectXml -> 4. - Nav: "Structured · JSON" / "Structured · XML". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Structured scanning split out of core is a breaking change — documented in CHANGELOG.md and surfaced on NuGet via PackageReleaseNotes on both packages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move JSON/XML/object scanning out of core RedactWire into a new opt-in package RedactWire.Structured, so the core library no longer carries a
System.Text.Jsondependency.Why
Core is a regex/checksum detection library but pulled
System.Text.Jsontransitively — for exactly one path (structured scanning) — forcing every string-only consumer onto STJ 10.x. RedactWire is 0.3.0 (pre-1.0), so this breaking move is cheap now, expensive later.Changes
src/RedactWire.Structured(netstandard2.0, Apache-2.0):JsonPiiScanner,XmlPiiScanner,ObjectPiiScanner,StructuredPiiMatchmoved here (namespaceRedactWirekept, sodetector.DetectJson(...)extension methods resolve with just an added package ref). References core +System.Text.Json 10.0.9. Version 0.3.0 (tracks core).System.Text.JsonPackageReference (only dep now:Microsoft.Extensions.DependencyInjection.Abstractions) and the 3 staticRedactor.DetectJson/Xml/Objectforwarders.tests/RedactWire.Structured.Tests(references the add-on); core test project stays STJ-free.nuget.md/ CLAUDE.md updated.Redactor.DetectJson/DetectXml/DetectObjectremoved (a static class can't be extension-method'd). With the add-on referenced, callRedactor.Default.DetectJson(...)ordetector.DetectJson(...). Moved method signatures and detection behavior unchanged.Verified
dotnet build0 warnings (both projectsTreatWarningsAsErrors);dotnet test281 green (259 core + 22 structured).DI.Abstractionsonly — no System.Text.Json.RedactWire+System.Text.Json.🤖 Generated with Claude Code