Choose the fields
Repeated key options define the redaction contract. Exact matching avoids silently broadening the selection.
Day 075 / Privacy / Explicit Redaction
Practice recursive JSON field redaction with a local Python CLI and synthetic examples.
Repeated key options define the redaction contract. Exact matching avoids silently broadening the selection.
A selected value is replaced in full; nested matches inside arrays are handled recursively.
Free text, identifying keys and unselected fields may still contain personal information. Successful transformation does not mean safe publication.
Explicit field selection
Recursive object and array handling
Synthetic sample included
Bounded parsing and fixed errors
Fourteen passing tests
Argparse, pathlib and JSON provide a dependency-free local CLI.
Tests cover selection, casing, arrays, subtrees, null values, idempotence, unchanged data and invalid input.