All use cases

JSON Cleaner

Sanitize data.

Automations
Prompt
Write a script to recursively traverse a JSON object, remove all keys with null values, and normalize date strings to ISO 8601 format.
Use this

Why this exists

Every developer has written the same throwaway script a dozen times: the API response comes back full of null fields and three different date formats, and before you can use it you have to scrub it. So you paste it into some sketchy online "JSON cleaner," watch it choke on nested objects, and wonder who now has your payload. The logic is not hard, it is just tedious to write again for every project. This blueprint writes it once, properly, and leaves the code in your repository so the next messy payload is already handled.

What the agent builds

A script that recursively walks a JSON object of any depth, strips out every key whose value is null so your data stops carrying dead weight, and normalizes date strings to a consistent ISO 8601 format. It handles nested objects and arrays, not just the top level, so a deeply buried null does not slip through. The result is clean, predictable JSON you can hand straight to the next step in your pipeline.

You watch it happen in the task workspace: the agent writes the traversal logic, runs it against sample data, and confirms the output is clean before handing it over. The code lands on a branch in your repository with a pull request ready.

Make it yours

The first version is a base you steer with plain follow-up messages:

  • "Also drop keys with empty strings and empty arrays."
  • "Make null-stripping optional behind a flag."
  • "Add a CLI so I can pipe a file straight through it."
  • "Coerce numeric strings to real numbers while you're at it."

Each follow-up wakes the same repository and the agent continues on its own code.

FAQ

What language is the script in? Whatever your project uses. Tell the agent your stack and it writes the cleaner to match.

Does it mutate my original data? By default it returns a cleaned copy. Ask for in-place mutation in a follow-up if that is what your pipeline needs.

Where does my data go? Nowhere. The script runs in your repository, on your machine, so no payload leaves for a third-party site.

JSON Cleaner | OutcomeDev Use Cases